Package org.hcjf.utils
Class Introspection.Getter
- java.lang.Object
-
- org.hcjf.utils.Introspection.Invoker
-
- org.hcjf.utils.Introspection.Accessor
-
- org.hcjf.utils.Introspection.Getter
-
- Enclosing class:
- Introspection
public static class Introspection.Getter extends Introspection.Accessor
Sub class of the accessor that represents only the getter accessors.
-
-
Constructor Summary
Constructors Constructor Description Getter(java.lang.Class implementationClass, java.lang.String resourceName, java.lang.reflect.Method method)
-
Method Summary
Modifier and Type Method Description <O> Oget(java.lang.Object instance)Reflection invoked by the underlying method to obtain the resource value.java.lang.reflect.ParameterizedTypegetParameterParameterizedType()Returns the parameterized type that corresponds with the parameter type.java.lang.ClassgetReturnCollectionType()If the result type if assignable to collection or map this this mehtod return the collection types of the result type.java.lang.ClassgetReturnKeyType()If the result type is assignable to map class then this method return the key type of the result type.java.lang.ClassgetReturnType()Return the result type of the getter method.-
Methods inherited from class org.hcjf.utils.Introspection.Accessor
getResourceName
-
Methods inherited from class org.hcjf.utils.Introspection.Invoker
getAnnotation, getAnnotations, getAnnotationsMap, getImplementationClass, getMethod, invoke, isAnnotationPresent
-
-
-
-
Method Detail
-
get
public <O> O get(java.lang.Object instance)
Reflection invoked by the underlying method to obtain the resource value.- Type Parameters:
O- Expected result type for the client.- Parameters:
instance- Instance to do reflection.- Returns:
- Resource value.
- Throws:
java.lang.reflect.InvocationTargetException- Invocation target exception.java.lang.IllegalAccessException- Illegal access exception.
-
getReturnType
public final java.lang.Class getReturnType()
Return the result type of the getter method.- Returns:
- Result type.
-
getParameterParameterizedType
public final java.lang.reflect.ParameterizedType getParameterParameterizedType()
Returns the parameterized type that corresponds with the parameter type.- Returns:
- Parameterized parameter type.
-
getReturnKeyType
public final java.lang.Class getReturnKeyType()
If the result type is assignable to map class then this method return the key type of the result type.- Returns:
- Key type of the map.
-
getReturnCollectionType
public final java.lang.Class getReturnCollectionType()
If the result type if assignable to collection or map this this mehtod return the collection types of the result type.- Returns:
- Collection type of the result type.
-
-