Examples of typeParametersFor()


Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

   @Override
   public Type getValidatedValueType(Type valueType)
   {
      ResolvedType resolvedType = typeResolver.resolve(valueType);
      return resolvedType.typeParametersFor(InputComponent.class).get(1).getErasedType();
   }

}
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

    }

    @Override
    public Type getValidatedValueType(final Type type) {
        ResolvedType resolvedType = resolver.resolve(type);
        return resolvedType.typeParametersFor(Optional.class).get(0).getErasedType();
    }
}
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  /**
   * Resolves the single type parameter of the given target class, using the given sub-type.
   */
  private static Class<?> resolveSingleTypeParameter(TypeResolver typeResolver, Type subType, Class<?> target) {
    ResolvedType resolvedType = typeResolver.resolve( subType );
    return resolvedType.typeParametersFor( target ).get( 0 ).getErasedType();
  }
}
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  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

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  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

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  private Class<?> determineAnnotationType(Class<?> constraintValidatorClass) {
    ResolvedType resolvedType = typeResolutionHelper.getTypeResolver()
        .resolve( constraintValidatorClass );

    return resolvedType.typeParametersFor( ConstraintValidator.class ).get( 0 ).getErasedType();
  }

  /**
   * Runs the given privileged action, using a privileged block if required.
   * <p>
 
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

    }

    @Override
    public Type getValidatedValueType(Type valueType) {
      ResolvedType resolvedType = typeResolver.resolve( valueType );
      return resolvedType.typeParametersFor( ValueHolder.class ).get( 0 ).getErasedType();
    }
  }

}
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  }

  @Override
  public Type getValidatedValueType(Type sourceType) {
    ResolvedType resolvedType = typeResolver.resolve( sourceType );
    return resolvedType.typeParametersFor( UiInput.class ).get( 0 ).getErasedType();
  }
}
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  }

  @Override
  public Type getValidatedValueType(Type sourceType) {
    ResolvedType resolvedType = typeResolver.resolve( sourceType );
    return resolvedType.typeParametersFor( Property.class ).get( 0 ).getErasedType();
  }
}
View Full Code Here

Examples of com.fasterxml.classmate.ResolvedType.typeParametersFor()

  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
TOP
Copyright © 2018 www.massapi.com. 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.