Package groovy.inspect
Class Inspector
java.lang.Object
groovy.inspect.Inspector
The Inspector provides a unified access to an object's
 information that can be determined by introspection.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringprotected Object
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected String[]protected String[]String[]Get the Class Properties of the object under inspection.protected ClassObject[]Get info about instance and class Methods that are dynamically added through Groovy.Tuple2[]Get info about instance and class Methods that are dynamically added through Groovy.Object[]Get info about usual Java instance and class Methods as well as Constructors.Tuple2[]Get info about usual Java instance and class Methods as well as Constructors.Gets the object being inspected.Object[]Object[]Get info about Properties (Java and Groovy alike).Object[]Get info about usual Java public fields incl.booleanisGroovy()protected String[]methodInfo(MetaMethod method) protected String[]methodInfo(Constructor ctor) protected String[]methodInfo(Method method) static voidstatic Stringstatic Collectionstatic Collectionsort(List<Object> memberInfo, Comparator<Object> comparator) protected String[]withoutNulls(String[] toNormalize) 
- 
Field Details- 
objectUnderInspection
- 
CLASS_PACKAGE_IDXpublic static final int CLASS_PACKAGE_IDX- See Also:
 
- 
CLASS_CLASS_IDXpublic static final int CLASS_CLASS_IDX- See Also:
 
- 
CLASS_INTERFACE_IDXpublic static final int CLASS_INTERFACE_IDX- See Also:
 
- 
CLASS_SUPERCLASS_IDXpublic static final int CLASS_SUPERCLASS_IDX- See Also:
 
- 
CLASS_OTHER_IDXpublic static final int CLASS_OTHER_IDX- See Also:
 
- 
MEMBER_ORIGIN_IDXpublic static final int MEMBER_ORIGIN_IDX- See Also:
 
- 
MEMBER_MODIFIER_IDXpublic static final int MEMBER_MODIFIER_IDX- See Also:
 
- 
MEMBER_DECLARER_IDXpublic static final int MEMBER_DECLARER_IDX- See Also:
 
- 
MEMBER_TYPE_IDXpublic static final int MEMBER_TYPE_IDX- See Also:
 
- 
MEMBER_NAME_IDXpublic static final int MEMBER_NAME_IDX- See Also:
 
- 
MEMBER_PARAMS_IDXpublic static final int MEMBER_PARAMS_IDX- See Also:
 
- 
MEMBER_VALUE_IDXpublic static final int MEMBER_VALUE_IDX- See Also:
 
- 
MEMBER_EXCEPTIONS_IDXpublic static final int MEMBER_EXCEPTIONS_IDX- See Also:
 
- 
NOT_APPLICABLE- See Also:
 
- 
GROOVY- See Also:
 
- 
JAVA- See Also:
 
 
- 
- 
Constructor Details- 
Inspector- Parameters:
- objectUnderInspection- must not be null
 
 
- 
- 
Method Details- 
getClassPropsGet the Class Properties of the object under inspection.- Returns:
- String array to be indexed by the CLASS_xxx_IDX constants
 
- 
isGroovypublic boolean isGroovy()
- 
getObjectGets the object being inspected.- Returns:
- the object
 
- 
getMethodsGet info about usual Java instance and class Methods as well as Constructors.- Returns:
- Array of StringArrays that can be indexed with the MEMBER_xxx_IDX constants
 
- 
getMethodsWithInfoGet info about usual Java instance and class Methods as well as Constructors.
- 
getMetaMethodsGet info about instance and class Methods that are dynamically added through Groovy.- Returns:
- Array of StringArrays that can be indexed with the MEMBER_xxx_IDX constants
 
- 
getMetaMethodsWithInfoGet info about instance and class Methods that are dynamically added through Groovy.
- 
getPublicFieldsGet info about usual Java public fields incl. constants.- Returns:
- Array of StringArrays that can be indexed with the MEMBER_xxx_IDX constants
 
- 
getPropertyInfoGet info about Properties (Java and Groovy alike).- Returns:
- Array of StringArrays that can be indexed with the MEMBER_xxx_IDX constants
 
- 
fieldInfo
- 
fieldInfo
- 
getPropertiesWithInfo
- 
fieldWithInfo
- 
getClassUnderInspection
- 
shortName
- 
methodInfo
- 
methodInfo
- 
methodInfo
- 
withoutNulls
- 
print
- 
sort
- 
sort
 
-