| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgroovy.inspect.Inspector
public class Inspector
The Inspector provides a unified access to an object's information that can be determined by introspection.
| Nested Class Summary | |
|---|---|
static class | 
Inspector.MemberComparator
 | 
| Field Summary | |
|---|---|
static int | 
CLASS_CLASS_IDX
 | 
static int | 
CLASS_INTERFACE_IDX
 | 
static int | 
CLASS_OTHER_IDX
 | 
static int | 
CLASS_PACKAGE_IDX
 | 
static int | 
CLASS_SUPERCLASS_IDX
 | 
static String | 
GROOVY
 | 
static String | 
JAVA
 | 
static int | 
MEMBER_DECLARER_IDX
 | 
static int | 
MEMBER_EXCEPTIONS_IDX
 | 
static int | 
MEMBER_MODIFIER_IDX
 | 
static int | 
MEMBER_NAME_IDX
 | 
static int | 
MEMBER_ORIGIN_IDX
 | 
static int | 
MEMBER_PARAMS_IDX
 | 
static int | 
MEMBER_TYPE_IDX
 | 
static int | 
MEMBER_VALUE_IDX
 | 
static String | 
NOT_APPLICABLE
 | 
protected  Object | 
objectUnderInspection
 | 
| Constructor Summary | |
|---|---|
Inspector(Object objectUnderInspection)
 | 
|
| Method Summary | |
|---|---|
protected  String[] | 
fieldInfo(Field field)
 | 
protected  String[] | 
fieldInfo(PropertyValue pv)
 | 
 String[] | 
getClassProps()
Get the Class Properties of the object under inspection.  | 
protected  Class | 
getClassUnderInspection()
 | 
 Object[] | 
getMetaMethods()
Get info about instance and class Methods that are dynamically added through Groovy.  | 
 Object[] | 
getMethods()
Get info about usual Java instance and class Methods as well as Constructors.  | 
 Object | 
getObject()
Gets the object being inspected.  | 
 Object[] | 
getPropertyInfo()
Get info about Properties (Java and Groovy alike).  | 
 Object[] | 
getPublicFields()
Get info about usual Java public fields incl. constants.  | 
 boolean | 
isGroovy()
 | 
protected  String[] | 
methodInfo(Constructor ctor)
 | 
protected  String[] | 
methodInfo(MetaMethod method)
 | 
protected  String[] | 
methodInfo(Method method)
 | 
static void | 
print(Object[] memberInfo)
 | 
static String | 
shortName(Class clazz)
 | 
static Collection | 
sort(List<Object> memberInfo)
 | 
protected  String[] | 
withoutNulls(String[] toNormalize)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Object objectUnderInspection
public static final int CLASS_PACKAGE_IDX
public static final int CLASS_CLASS_IDX
public static final int CLASS_INTERFACE_IDX
public static final int CLASS_SUPERCLASS_IDX
public static final int CLASS_OTHER_IDX
public static final int MEMBER_ORIGIN_IDX
public static final int MEMBER_MODIFIER_IDX
public static final int MEMBER_DECLARER_IDX
public static final int MEMBER_TYPE_IDX
public static final int MEMBER_NAME_IDX
public static final int MEMBER_PARAMS_IDX
public static final int MEMBER_VALUE_IDX
public static final int MEMBER_EXCEPTIONS_IDX
public static final String NOT_APPLICABLE
public static final String GROOVY
public static final String JAVA
| Constructor Detail | 
|---|
public Inspector(Object objectUnderInspection)
objectUnderInspection - must not be null| Method Detail | 
|---|
public String[] getClassProps()
public boolean isGroovy()
public Object getObject()
public Object[] getMethods()
public Object[] getMetaMethods()
public Object[] getPublicFields()
public Object[] getPropertyInfo()
protected String[] fieldInfo(Field field)
protected String[] fieldInfo(PropertyValue pv)
protected Class getClassUnderInspection()
public static String shortName(Class clazz)
protected String[] methodInfo(Method method)
protected String[] methodInfo(Constructor ctor)
protected String[] methodInfo(MetaMethod method)
protected String[] withoutNulls(String[] toNormalize)
public static void print(Object[] memberInfo)
public static Collection sort(List<Object> memberInfo)
  | 
Copyright © 2003-2012 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||