Package com.fasterxml.classmate

Examples of com.fasterxml.classmate.ResolvedTypeWithMembers$AnnotationHandler


    MemberResolver resolver = new MemberResolver(typeResolver);
    resolver.setIncludeLangObject(false);
    if (resolvedType.getErasedType() == Object.class) {
      return ImmutableList.of();
    }
    ResolvedTypeWithMembers typeWithMembers = resolver.resolve(resolvedType, null, null);
    return FluentIterable
            .from(newArrayList(typeWithMembers.getMemberMethods()))
            .filter(onlyGettersAndSetters()).toList();
  }
View Full Code Here


  public Iterable<? extends ResolvedField> in(ResolvedType resolvedType) {
    MemberResolver memberResolver = new MemberResolver(typeResolver);
    if (resolvedType.getErasedType() == Object.class) {
      return newArrayList();
    }
    ResolvedTypeWithMembers resolvedMemberWithMembers = memberResolver.resolve(resolvedType, null, null);
    return newArrayList(resolvedMemberWithMembers.getMemberFields());
  }
View Full Code Here

    ResolvedType resolvedSubType = typeResolver.resolve( subTypeMethod.getDeclaringClass() );

    MemberResolver memberResolver = new MemberResolver( typeResolver );
    memberResolver.setMethodFilter( new SimpleMethodFilter( subTypeMethod, superTypeMethod ) );
    ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(
        resolvedSubType,
        null,
        null
    );

    ResolvedMethod[] resolvedMethods = typeWithMembers.getMemberMethods();

    // The ClassMate doc says that overridden methods are flattened to one
    // resolved method. But that is the case only for methods without any
    // generic parameters.
    if ( resolvedMethods.length == 1 ) {
View Full Code Here

    defaultAccessType = determineDefaultAccessType( classes );
    inheritanceType = determineInheritanceType( classes );

    // the resolved type for the top level class in the hierarchy
    Class<?> clazz = context.classLoaderService().classForName( classes.get( classes.size() - 1 ).name().toString() );
    ResolvedTypeWithMembers resolvedType = ReflectionHelper.resolveMemberTypes( clazz );

    configuredClasses = new ArrayList<ConfiguredClass>();
    ConfiguredClass parent = null;
    for ( ClassInfo info : classes ) {
      ConfiguredClass configuredClass = new ConfiguredClass(
View Full Code Here

   *
   * @return A list of the persistent properties of this configured class
   */
  private List<MappedAttribute> collectAttributes(ResolvedTypeWithMembers resolvedTypes) {
    // use the class mate library to generic types
    ResolvedTypeWithMembers resolvedType = null;
    for ( HierarchicType hierarchicType : resolvedTypes.allTypesAndOverrides() ) {
      if ( hierarchicType.getType().getErasedType().equals( clazz ) ) {
        resolvedType = ReflectionHelper.resolveMemberTypes( hierarchicType.getType() );
        break;
      }
View Full Code Here

        List<String> fields = new ArrayList<String>();
        TypeResolver typeResolver = new TypeResolver();
        ResolvedType resolvedType = typeResolver.resolve(type);

        MemberResolver memberResolver = new MemberResolver(typeResolver);
        ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(resolvedType, null, null);

        for (ResolvedField field : typeWithMembers.getMemberFields())
        {
            fields.add(field.getName());
        }

        return fields;
View Full Code Here

    {
        TypeResolver typeResolver = new TypeResolver();
        ResolvedType resolvedType = typeResolver.resolve(type);

        MemberResolver memberResolver = new MemberResolver(typeResolver);
        ResolvedTypeWithMembers typeWithMembers =memberResolver.resolve(resolvedType, null, null);

        for (ResolvedField field : typeWithMembers.getMemberFields())
        {
            fields.put(field.getName(),field);
        }

        beanMap = BeanMap.create(createInstance(type));
View Full Code Here

    ResolvedType resolvedSubType = typeResolver.resolve( subTypeMethod.getDeclaringClass() );

    MemberResolver memberResolver = new MemberResolver( typeResolver );
    memberResolver.setMethodFilter( new SimpleMethodFilter( subTypeMethod, superTypeMethod ) );
    ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(
        resolvedSubType,
        null,
        null
    );

    ResolvedMethod[] resolvedMethods = typeWithMembers.getMemberMethods();

    // The ClassMate doc says that overridden methods are flattened to one
    // resolved method. But that is the case only for methods without any
    // generic parameters.
    if ( resolvedMethods.length == 1 ) {
View Full Code Here

    ResolvedType resolvedSubType = typeResolver.resolve( subTypeMethod.getDeclaringClass() );

    MemberResolver memberResolver = new MemberResolver( typeResolver );
    memberResolver.setMethodFilter( new SimpleMethodFilter( subTypeMethod, superTypeMethod ) );
    ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(
        resolvedSubType,
        null,
        null
    );

    ResolvedMethod[] resolvedMethods = typeWithMembers.getMemberMethods();

    // The ClassMate doc says that overridden methods are flattened to one
    // resolved method. But that is the case only for methods without any
    // generic parameters.
    if ( resolvedMethods.length == 1 ) {
View Full Code Here

TOP

Related Classes of com.fasterxml.classmate.ResolvedTypeWithMembers$AnnotationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.