Class ExecutableInfo
- Direct Known Subclasses:
- ConstructorInfo,- MethodInfo
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedExecutableInfo(ClassInfo declaringClass, Executable e) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionAttempts to callx.setAccessible(and quietly ignores security exceptions.true )forEachParam(Predicate<ParamInfo> filter, Consumer<ParamInfo> action) Performs an action on every parameter that matches the specified filter.final <A extends Annotation>
 ExecutableInfoforEachParameterAnnotation(int index, Class<A> type, Predicate<A> predicate, Consumer<A> consumer) Performs an action on all matching parameter annotations at the specified parameter index.final intfuzzyArgsMatch(Class<?>... argTypes) Returns how well this method matches the specified arg types.final intfuzzyArgsMatch(Object... argTypes) Returns how well this method matches the specified arg types.final intfuzzyArgsMatch(ClassInfo... argTypes) Returns how well this method matches the specified arg types.final ClassInfoReturns metadata about the class that declared this method or constructor.Returns the exception types on this executable.final StringReturns the full name of this executable.final ParamInfogetParam(int index) Returns parameter information at the specified index.final intReturns the number of parameters in this executable.Returns the parameters defined on this executable.final ClassInfogetParamType(int index) Returns the parameter type of the parameter at the specified index.Returns the parameter types on this executable.final TypegetRawGenericParamType(int index) Returns the raw generic parameter type of the parameter at the specified index.Returns the raw generic parameter types on this executable.final ParametergetRawParameter(int index) Returns the rawParameterobject that represents the parameter at the specified index.Returns an array of rawParameterobjects that represent all the parameters to the underlying executable represented by this object.final Class<?>getRawParamType(int index) Returns the raw parameter type of the parameter at the specified index.Returns the raw parameter types on this executable.final StringReturns the short name of this executable.final StringReturns the simple name of the underlying method.final booleanhasFuzzyParamTypes(Class<?>... args) Returnstrue if this method has at most only this arguments in any order.final booleanhasFuzzyParamTypes(ClassInfo... args) Returnstrue if this method has at most only this arguments in any order.final booleanhasMatchingParamTypes(Class<?>... args) Returnstrue if this method has the specified argument parent classes.final booleanhasMatchingParamTypes(ClassInfo... args) Returnstrue if this method has the specified argument parent classes.final booleanReturnstrue if this method has this name.final booleanReturnstrue if this method has a name in the specified list.final booleanReturnstrue if this method has a name in the specified set.final booleanReturnstrue if this executable has no parameters.final booleanhasNumParams(int number) Returnstrue if this executable has this number of arguments.final booleanReturnstrue if this executable has at least one parameter.final booleanhasParamTypes(Class<?>... args) Returnstrue if this method has the specified arguments.final booleanhasParamTypes(ClassInfo... args) Returnstrue if this method has the specified arguments.final booleanis(ReflectFlags... flags) Returnstrue if all specified flags are applicable to this field.final booleanReturnstrue if this method is abstract.final booleanisAll(ReflectFlags... flags) Returnstrue if all specified flags are applicable to this method.final booleanisAny(ReflectFlags... flags) Returnstrue if all specified flags are applicable to this method.final booleanReturnstrue if this executable represents aConstructor.final booleanReturnstrue if this method has the@Deprecatedannotation on it.final booleanReturnstrue if this method is not abstract.final booleanReturnstrue if this method doesn't have the@Deprecatedannotation on it.final booleanReturnstrue if this method is not protected.final booleanReturnstrue if this method is not public.final booleanReturnstrue if this method is not static.final booleanReturnstrue if this method is protected.final booleanisPublic()Returnstrue if this method is public.final booleanisStatic()Returnstrue if this method is static.final booleanIdentifies if the specified visibility matches this method.final booleanAttempts to callx.setAccessible(and quietly ignores security exceptions.true )toString()
- 
Constructor Details- 
ExecutableInfoConstructor.- Parameters:
- declaringClass- The class that declares this method or constructor.
- e- The constructor or method that this info represents.
 
 
- 
- 
Method Details- 
getDeclaringClassReturns metadata about the class that declared this method or constructor.- Returns:
- Metadata about the class that declared this method or constructor.
 
- 
isConstructorReturnstrue if this executable represents aConstructor.- Returns:
- true if this executable represents a- Constructorand can be cast to- ConstructorInfo.- false if this executable represents a- Methodand can be cast to- MethodInfo.
 
- 
getParamCountReturns the number of parameters in this executable.Same as calling Executable.getParameterCount().- Returns:
- The number of parameters in this executable.
 
- 
hasParamsReturnstrue if this executable has at least one parameter.Same as calling Executable.getParameterCount()and comparing with zero.- Returns:
- true if this executable has at least one parameter.
 
- 
hasNoParamsReturnstrue if this executable has no parameters.Same as calling Executable.getParameterCount()and comparing with zero.- Returns:
- true if this executable has no parameters.
 
- 
hasNumParamsReturnstrue if this executable has this number of arguments.Same as calling Executable.getParameterCount()and comparing the count.- Parameters:
- number- The number of expected arguments.
- Returns:
- true if this executable has this number of arguments.
 
- 
getParamsReturns the parameters defined on this executable.Same as calling Executable.getParameters()but wraps the results- Returns:
- An array of parameter information, never null .
 
- 
forEachParamPerforms an action on every parameter that matches the specified filter.- Parameters:
- filter- The filter, can be- null .
- action- The action to perform.
- Returns:
- This object.
 
- 
getParamReturns parameter information at the specified index.- Parameters:
- index- The parameter index.
- Returns:
- The parameter information, never null .
 
- 
getParamTypesReturns the parameter types on this executable.- Returns:
- The parameter types on this executable.
 
- 
getParamTypeReturns the parameter type of the parameter at the specified index.- Parameters:
- index- The parameter index.
- Returns:
- The parameter type of the parameter at the specified index.
 
- 
getRawParamTypesReturns the raw parameter types on this executable.- Returns:
- The raw parameter types on this executable.
 
- 
getRawParamTypeReturns the raw parameter type of the parameter at the specified index.- Parameters:
- index- The parameter index.
- Returns:
- The raw parameter type of the parameter at the specified index.
 
- 
getRawGenericParamTypesReturns the raw generic parameter types on this executable.- Returns:
- The raw generic parameter types on this executable.
 
- 
getRawGenericParamTypeReturns the raw generic parameter type of the parameter at the specified index.- Parameters:
- index- The parameter index.
- Returns:
- The raw generic parameter type of the parameter at the specified index.
 
- 
getRawParametersReturns an array of rawParameterobjects that represent all the parameters to the underlying executable represented by this object.- Returns:
- An array of raw Parameterobjects, or an empty array if executable has no parameters.
- See Also:
 
- 
getRawParameterReturns the rawParameterobject that represents the parameter at the specified index.- Parameters:
- index- The parameter index.
- Returns:
- The raw Parameterobject that represents the parameter at the specified index.
- See Also:
 
- 
forEachParameterAnnotationpublic final <A extends Annotation> ExecutableInfo forEachParameterAnnotation(int index, Class<A> type, Predicate<A> predicate, Consumer<A> consumer) Performs an action on all matching parameter annotations at the specified parameter index.- Type Parameters:
- A- The annotation type.
- Parameters:
- index- The parameter index.
- type- The annotation type.
- predicate- The predicate.
- consumer- The consumer.
- Returns:
- This object.
 
- 
getExceptionTypesReturns the exception types on this executable.- Returns:
- The exception types on this executable.
 
- 
isAllReturnstrue if all specified flags are applicable to this method.- Parameters:
- flags- The flags to test for.
- Returns:
- true if all specified flags are applicable to this method.
 
- 
isReturnstrue if all specified flags are applicable to this field.- Parameters:
- flags- The flags to test for.
- Returns:
- true if all specified flags are applicable to this field.
 
- 
isAnyReturnstrue if all specified flags are applicable to this method.- Parameters:
- flags- The flags to test for.
- Returns:
- true if all specified flags are applicable to this method.
 
- 
hasParamTypesReturnstrue if this method has the specified arguments.- Parameters:
- args- The arguments to test for.
- Returns:
- true if this method has this arguments in the exact order.
 
- 
hasParamTypesReturnstrue if this method has the specified arguments.- Parameters:
- args- The arguments to test for.
- Returns:
- true if this method has this arguments in the exact order.
 
- 
hasMatchingParamTypesReturnstrue if this method has the specified argument parent classes.- Parameters:
- args- The arguments to test for.
- Returns:
- true if this method has this arguments in the exact order.
 
- 
hasMatchingParamTypesReturnstrue if this method has the specified argument parent classes.- Parameters:
- args- The arguments to test for.
- Returns:
- true if this method has this arguments in the exact order.
 
- 
hasFuzzyParamTypesReturnstrue if this method has at most only this arguments in any order.- Parameters:
- args- The arguments to test for.
- Returns:
- true if this method has at most only this arguments in any order.
 
- 
fuzzyArgsMatchReturns how well this method matches the specified arg types.The number returned is the number of method arguments that match the passed in arg types. 
 Returns-1 if the method cannot take in one or more of the specified arguments.- Parameters:
- argTypes- The arg types to check against.
- Returns:
- How many parameters match or -1 if method cannot handle one or more of the arguments.
 
- 
fuzzyArgsMatchReturns how well this method matches the specified arg types.The number returned is the number of method arguments that match the passed in arg types. 
 Returns-1 if the method cannot take in one or more of the specified arguments.- Parameters:
- argTypes- The arg types to check against.
- Returns:
- How many parameters match or -1 if method cannot handle one or more of the arguments.
 
- 
hasFuzzyParamTypesReturnstrue if this method has at most only this arguments in any order.- Parameters:
- args- The arguments to test for.
- Returns:
- true if this method has at most only this arguments in any order.
 
- 
fuzzyArgsMatchReturns how well this method matches the specified arg types.The number returned is the number of method arguments that match the passed in arg types. 
 Returns-1 if the method cannot take in one or more of the specified arguments.- Parameters:
- argTypes- The arg types to check against.
- Returns:
- How many parameters match or -1 if method cannot handle one or more of the arguments.
 
- 
isDeprecatedReturnstrue if this method has the@Deprecatedannotation on it.- Returns:
- true if this method has the- @Deprecatedannotation on it.
 
- 
isNotDeprecatedReturnstrue if this method doesn't have the@Deprecatedannotation on it.- Returns:
- true if this method doesn't have the- @Deprecatedannotation on it.
 
- 
isAbstractReturnstrue if this method is abstract.- Returns:
- true if this method is abstract.
 
- 
isNotAbstractReturnstrue if this method is not abstract.- Returns:
- true if this method is not abstract.
 
- 
isPublicReturnstrue if this method is public.- Returns:
- true if this method is public.
 
- 
isNotPublicReturnstrue if this method is not public.- Returns:
- true if this method is not public.
 
- 
isProtectedReturnstrue if this method is protected.- Returns:
- true if this method is protected.
 
- 
isNotProtectedReturnstrue if this method is not protected.- Returns:
- true if this method is not protected.
 
- 
isStaticReturnstrue if this method is static.- Returns:
- true if this method is static.
 
- 
isNotStaticReturnstrue if this method is not static.- Returns:
- true if this method is not static.
 
- 
accessibleAttempts to callx.setAccessible(and quietly ignores security exceptions.true )- Returns:
- This object.
 
- 
setAccessibleAttempts to callx.setAccessible(and quietly ignores security exceptions.true )- Returns:
- true if call was successful.
 
- 
isVisibleIdentifies if the specified visibility matches this method.- Parameters:
- v- The visibility to validate against.
- Returns:
- true if this visibility matches the modifier attribute of this method.
 
- 
hasNameReturnstrue if this method has this name.- Parameters:
- name- The name to test for.
- Returns:
- true if this method has this name.
 
- 
hasNameReturnstrue if this method has a name in the specified list.- Parameters:
- names- The names to test for.
- Returns:
- true if this method has one of the names.
 
- 
hasNameReturnstrue if this method has a name in the specified set.- Parameters:
- names- The names to test for.
- Returns:
- true if this method has one of the names.
 
- 
getFullNameReturns the full name of this executable.Examples:- "com.foo.MyClass.get(java.util.String)" - Method.
- "com.foo.MyClass(java.util.String)" - Constructor.
 - Returns:
- The underlying executable name.
 
- 
getShortNameReturns the short name of this executable.Examples:- "MyClass.get(String)" - Method.
- "MyClass(String)" - Constructor.
 - Returns:
- The underlying executable name.
 
- 
getSimpleNameReturns the simple name of the underlying method.- Returns:
- The simple name of the underlying method;
 
- 
toString
 
-