Class Invokable.ConstructorInvokable<T>

  • All Implemented Interfaces:
    java.lang.reflect.AnnotatedElement, java.lang.reflect.GenericDeclaration, java.lang.reflect.Member
    Enclosing class:
    Invokable<T,​R>

    static class Invokable.ConstructorInvokable<T>
    extends Invokable<T,​T>
    • Field Detail

      • constructor

        final java.lang.reflect.Constructor<?> constructor
    • Constructor Detail

      • ConstructorInvokable

        ConstructorInvokable​(java.lang.reflect.Constructor<?> constructor)
    • Method Detail

      • invokeInternal

        final java.lang.Object invokeInternal​(@Nullable
                                              java.lang.Object receiver,
                                              java.lang.Object[] args)
                                       throws java.lang.reflect.InvocationTargetException,
                                              java.lang.IllegalAccessException
        Specified by:
        invokeInternal in class Invokable<T,​T>
        Throws:
        java.lang.reflect.InvocationTargetException
        java.lang.IllegalAccessException
      • getGenericReturnType

        java.lang.reflect.Type getGenericReturnType()
        If the class is parameterized, such as ArrayList, this returns ArrayList.
        Specified by:
        getGenericReturnType in class Invokable<T,​T>
      • getGenericExceptionTypes

        java.lang.reflect.Type[] getGenericExceptionTypes()
        Description copied from class: Invokable
        This should never return a type that's not a subtype of Throwable.
        Specified by:
        getGenericExceptionTypes in class Invokable<T,​T>
      • getTypeParameters

        public final java.lang.reflect.TypeVariable<?>[] getTypeParameters()
        [<E>] will be returned for ArrayList's constructor. When both the class and the constructor have type parameters, the class parameters are prepended before those of the constructor's. This is an arbitrary rule since no existing language spec mandates one way or the other. From the declaration syntax, the class type parameter appears first, but the call syntax may show up in opposite order such as new <A>Foo<B>().
      • isOverridable

        public final boolean isOverridable()
        Description copied from class: Invokable
        Returns true if this is an overridable method. Constructors, private, static or final methods, or methods declared by final classes are not overridable.
        Specified by:
        isOverridable in class Invokable<T,​T>
      • isVarArgs

        public final boolean isVarArgs()
        Description copied from class: Invokable
        Returns true if this was declared to take a variable number of arguments.
        Specified by:
        isVarArgs in class Invokable<T,​T>
      • mayNeedHiddenThis

        private boolean mayNeedHiddenThis()