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>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.reflect.Invokable
Invokable.ConstructorInvokable<T>, Invokable.MethodInvokable<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.reflect.Constructor<?>
constructor
-
Constructor Summary
Constructors Constructor Description ConstructorInvokable(java.lang.reflect.Constructor<?> constructor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.reflect.AnnotatedType[]
getAnnotatedParameterTypes()
java.lang.reflect.AnnotatedType
getAnnotatedReturnType()
(package private) java.lang.reflect.Type[]
getGenericExceptionTypes()
This should never return a type that's not a subtype of Throwable.(package private) java.lang.reflect.Type[]
getGenericParameterTypes()
(package private) java.lang.reflect.Type
getGenericReturnType()
If the class is parameterized, such asArrayList
, this returnsArrayList<E>
.(package private) java.lang.annotation.Annotation[][]
getParameterAnnotations()
java.lang.reflect.TypeVariable<?>[]
getTypeParameters()
SeeGenericDeclaration.getTypeParameters()
.(package private) java.lang.Object
invokeInternal(java.lang.Object receiver, java.lang.Object[] args)
boolean
isOverridable()
Returnstrue
if this is an overridable method.boolean
isVarArgs()
Returnstrue
if this was declared to take a variable number of arguments.private boolean
mayNeedHiddenThis()
-
Methods 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, trySetAccessible
-
-
-
-
Method Detail
-
invokeInternal
final java.lang.Object invokeInternal(@CheckForNull java.lang.Object receiver, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
- Specified by:
invokeInternal
in classInvokable<T,T>
- Throws:
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
-
getGenericReturnType
java.lang.reflect.Type getGenericReturnType()
If the class is parameterized, such asArrayList
, this returnsArrayList<E>
.- Specified by:
getGenericReturnType
in classInvokable<T,T>
-
getGenericParameterTypes
java.lang.reflect.Type[] getGenericParameterTypes()
- Specified by:
getGenericParameterTypes
in classInvokable<T,T>
-
getAnnotatedParameterTypes
java.lang.reflect.AnnotatedType[] getAnnotatedParameterTypes()
- Specified by:
getAnnotatedParameterTypes
in classInvokable<T,T>
-
getAnnotatedReturnType
public java.lang.reflect.AnnotatedType getAnnotatedReturnType()
- Specified by:
getAnnotatedReturnType
in classInvokable<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 classInvokable<T,T>
-
getParameterAnnotations
final java.lang.annotation.Annotation[][] getParameterAnnotations()
- Specified by:
getParameterAnnotations
in classInvokable<T,T>
-
getTypeParameters
public final java.lang.reflect.TypeVariable<?>[] 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:
getTypeParameters
in classInvokable<T,T>
-
isOverridable
public final boolean isOverridable()
Description copied from class:Invokable
Returnstrue
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 classInvokable<T,T>
-
isVarArgs
public final boolean isVarArgs()
Description copied from class:Invokable
Returnstrue
if this was declared to take a variable number of arguments.
-
mayNeedHiddenThis
private boolean mayNeedHiddenThis()
-
-