Package com.fasterxml.classmate

Examples of com.fasterxml.classmate.ResolvedType


      if (subTypeMethod.getParameterTypes().length == 0)
      {
         return true;
      }

      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();
View Full Code Here


  private static boolean parametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod) {
    if ( subTypeMethod.getParameterTypes().length == 0 ) {
      return true;
    }

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

    MemberResolver memberResolver = new MemberResolver( typeResolver );
    memberResolver.setMethodFilter( new SimpleMethodFilter( subTypeMethod, superTypeMethod ) );
    ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(
        resolvedSubType,
View Full Code Here

  @Override
  public void resolveAllTypes(String className) {
    // the resolved type for the top level class in the hierarchy
    Class<?> clazz = classLoaderService.getValue().classForName( className );
    ResolvedType resolvedType = typeResolver.resolve( clazz );
    while ( resolvedType != null ) {
      // todo - check whether there is already something in the map
      resolvedTypeCache.put( clazz, resolvedType );
      resolvedType = resolvedType.getParentClass();
      if ( resolvedType != null ) {
        clazz = resolvedType.getErasedType();
      }
    }
  }
View Full Code Here

  private boolean instanceMethodParametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod) {
    if ( subTypeMethod.getParameterTypes().length == 0 ) {
      return true;
    }

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

    MemberResolver memberResolver = new MemberResolver( typeResolver );
    memberResolver.setMethodFilter( new SimpleMethodFilter( subTypeMethod, superTypeMethod ) );
    ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(
        resolvedSubType,
View Full Code Here

  @Override
  public void resolveAllTypes(String className) {
    // the resolved type for the top level class in the hierarchy
    Class<?> clazz = classLoaderService.getValue().classForName( className );
    ResolvedType resolvedType = typeResolver.resolve( clazz );
    while ( resolvedType != null ) {
      // todo - check whether there is already something in the map
      resolvedTypeCache.put( clazz, resolvedType );
      resolvedType = resolvedType.getParentClass();
      if ( resolvedType != null ) {
        clazz = resolvedType.getErasedType();
      }
    }
  }
View Full Code Here

    }
    return name;
  }

  public static ResolvedTypeWithMembers resolveMemberTypes(Class<?> clazz) {
    ResolvedType resolvedType = typeResolver.resolve( clazz );
    MemberResolver memberResolver = new MemberResolver( typeResolver );
    return memberResolver.resolve( resolvedType, null, null );
  }
View Full Code Here

    protected List<String> getFieldNames(Class<?> type)
    {
        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())
View Full Code Here

  private boolean instanceMethodParametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod) {
    if ( subTypeMethod.getParameterTypes().length == 0 ) {
      return true;
    }

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

    MemberResolver memberResolver = new MemberResolver( typeResolver );
    memberResolver.setMethodFilter( new SimpleMethodFilter( subTypeMethod, superTypeMethod ) );
    ResolvedTypeWithMembers typeWithMembers = memberResolver.resolve(
        resolvedSubType,
View Full Code Here

   */
  private ValidatedValueUnwrapper<?> getValidatedValueHandler(Type type) {
    TypeResolver typeResolver = typeResolutionHelper.getTypeResolver();

    for ( ValidatedValueUnwrapper<?> handler : validatedValueHandlers ) {
      ResolvedType handlerType = typeResolver.resolve( handler.getClass() );
      List<ResolvedType> typeParameters = handlerType.typeParametersFor( ValidatedValueUnwrapper.class );

      if ( TypeHelper.isAssignable( typeParameters.get( 0 ).getErasedType(), type ) ) {
        return handler;
      }
    }
View Full Code Here

   */
  public ValidatedValueUnwrapper<?> getValidatedValueUnwrapper(Type type) {
    TypeResolver typeResolver = typeResolutionHelper.getTypeResolver();

    for ( ValidatedValueUnwrapper<?> handler : validatedValueUnwrappers ) {
      ResolvedType handlerType = typeResolver.resolve( handler.getClass() );
      List<ResolvedType> typeParameters = handlerType.typeParametersFor( ValidatedValueUnwrapper.class );

      if ( TypeHelper.isAssignable( typeParameters.get( 0 ).getErasedType(), type ) ) {
        return handler;
      }
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.classmate.ResolvedType

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.