@BeanIgnore public final class ConstructorInfo extends ExecutableInfo implements Comparable<ConstructorInfo>
Modifier | Constructor and Description |
---|---|
protected |
ConstructorInfo(ClassInfo declaringClass,
Constructor<?> c)
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)
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, toString
protected ConstructorInfo(ClassInfo declaringClass, Constructor<?> c)
declaringClass
- The class that declares this method.c
- The constructor being wrapped.public static ConstructorInfo of(ClassInfo declaringClass, Constructor<?> c)
ConstructorInfo
;declaringClass
- The class that declares this method.c
- The constructor being wrapped.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.