Class Introspection.Getter

    • Constructor Summary

      Constructors 
      Constructor Description
      Getter​(java.lang.Class implementationClass, java.lang.String resourceName, java.lang.reflect.Method method)  
    • Constructor Detail

      • Getter

        public Getter​(java.lang.Class implementationClass,
                      java.lang.String resourceName,
                      java.lang.reflect.Method method)
    • 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.