Package com.google.common.reflect
Class Invokable.ConstructorInvokable<T>
java.lang.Object
com.google.common.reflect.Invokable<T,T>
com.google.common.reflect.Invokable.ConstructorInvokable<T>
- All Implemented Interfaces:
AnnotatedElement,Member
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.reflect.Invokable
Invokable.ConstructorInvokable<T>, Invokable.MethodInvokable<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) AnnotatedType[](package private) Type[]This should never return a type that's not a subtype of Throwable.(package private) Type[](package private) TypeIf the class is parameterized, such asArrayList, this returnsArrayList<E>.(package private) final Annotation[][]final TypeVariable<?>[](package private) final ObjectinvokeInternal(Object receiver, Object[] args) final booleanReturnstrueif this is an overridable method.final booleanReturnstrueif this was declared to take a variable number of arguments.private booleanMethods inherited from class com.google.common.reflect.Invokable
equals, from, from, getAnnotation, getAnnotations, getDeclaredAnnotations, getDeclaringClass, getExceptionTypes, getModifiers, getName, getOwnerType, getParameters, getReturnType, hashCode, invoke, isAbstract, isAccessible, isAnnotationPresent, isFinal, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, isTransient, isVolatile, returning, returning, setAccessible, toString, trySetAccessibleMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
Field Details
-
constructor
-
-
Constructor Details
-
ConstructorInvokable
ConstructorInvokable(Constructor<?> constructor)
-
-
Method Details
-
invokeInternal
final Object invokeInternal(@CheckForNull Object receiver, Object[] args) throws InvocationTargetException, IllegalAccessException - Specified by:
invokeInternalin classInvokable<T,T> - Throws:
InvocationTargetExceptionIllegalAccessException
-
getGenericReturnType
Type getGenericReturnType()If the class is parameterized, such asArrayList, this returnsArrayList<E>.- Specified by:
getGenericReturnTypein classInvokable<T,T>
-
getGenericParameterTypes
Type[] getGenericParameterTypes()- Specified by:
getGenericParameterTypesin classInvokable<T,T>
-
getAnnotatedParameterTypes
AnnotatedType[] getAnnotatedParameterTypes()- Specified by:
getAnnotatedParameterTypesin classInvokable<T,T>
-
getAnnotatedReturnType
- Specified by:
getAnnotatedReturnTypein classInvokable<T,T>
-
getGenericExceptionTypes
Type[] getGenericExceptionTypes()Description copied from class:InvokableThis should never return a type that's not a subtype of Throwable.- Specified by:
getGenericExceptionTypesin classInvokable<T,T>
-
getParameterAnnotations
- Specified by:
getParameterAnnotationsin classInvokable<T,T>
-
getTypeParameters
SeeGenericDeclaration.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 asnew <A>Foo<B>().- Specified by:
getTypeParametersin classInvokable<T,T>
-
isOverridable
public final boolean isOverridable()Description copied from class:InvokableReturnstrueif this is an overridable method. Constructors, private, static or final methods, or methods declared by final classes are not overridable.- Specified by:
isOverridablein classInvokable<T,T>
-
isVarArgs
public final boolean isVarArgs()Description copied from class:InvokableReturnstrueif this was declared to take a variable number of arguments. -
mayNeedHiddenThis
private boolean mayNeedHiddenThis()
-