@BeanIgnore public final class ConstructorInfo extends ExecutableInfo implements Comparable<ConstructorInfo>
| Modifier | Constructor and Description |
|---|---|
protected |
ConstructorInfo(ClassInfo declaringClass,
Constructor<?> c,
Constructor<?> rc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ConstructorInfo o) |
<T> Constructor<T> |
inner()
Returns the wrapped method.
|
<T> T |
invoke(Object... args)
Shortcut for calling the new-instance method on the underlying constructor.
|
ConstructorInfo |
makeAccessible(Visibility v)
Makes constructor accessible if it matches the visibility requirements, or returns
|
static ConstructorInfo |
of(ClassInfo declaringClass,
Constructor<?> c,
Constructor<?> rc)
Convenience method for instantiating a
ConstructorInfo; |
static ConstructorInfo |
of(Constructor<?> c)
Convenience method for instantiating a
ConstructorInfo; |
findAnnotation, getAnnotation, getDeclaringClass, getExceptionTypes, getFullName, getParam, getParamCount, getParameterAnnotations, getParameterAnnotations, getParams, getParamType, getParamTypes, getRawExceptionTypes, getRawGenericParamType, getRawGenericParamTypes, getRawParameter, getRawParameters, getRawParamType, getRawParamTypes, getShortName, getSimpleName, hasAnnotation, hasFuzzyParamTypes, hasFuzzyParamTypes, hasName, hasName, hasName, hasNoParams, hasNumParams, hasParams, hasParamTypeParents, hasParamTypeParents, hasParamTypes, hasParamTypes, isAbstract, isAll, isAny, isConstructor, isDeprecated, isNotAbstract, isNotDeprecated, isNotPublic, isNotStatic, isPublic, isStatic, isVisible, setAccessible, toStringprotected ConstructorInfo(ClassInfo declaringClass, Constructor<?> c, Constructor<?> rc)
declaringClass - The class that declares this method.c - The constructor being wrapped.rc - The "real" constructor if the constructor above is defined against a CGLIB proxy.public static ConstructorInfo of(ClassInfo declaringClass, Constructor<?> c, Constructor<?> rc)
ConstructorInfo;declaringClass - The class that declares this method.c - The constructor being wrapped.rc - The "real" constructor if the constructor above is defined against a CGLIB proxy.ConstructorInfo object, or public static ConstructorInfo of(Constructor<?> c)
ConstructorInfo;c - The constructor being wrapped.ConstructorInfo object, or public <T> Constructor<T> inner()
public <T> T invoke(Object... args) throws ExecutableException
args - the arguments used for the method callExecutableException - Exception occurred on invoked constructor/method/field.public ConstructorInfo makeAccessible(Visibility v)
Security exceptions thrown on the call to AccessibleObject.setAccessible(boolean) are quietly ignored.
v - The minimum visibility.AccessibleObject.setAccessible(boolean) throws a security exception.public int compareTo(ConstructorInfo o)
compareTo in interface Comparable<ConstructorInfo>Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.