org.drools.core.util.asm
Class ClassFieldInspector
java.lang.Object
org.drools.core.util.asm.ClassFieldInspector
public class ClassFieldInspector
- extends Object
Visit a POJO user class, and extract the property getter methods that are public, in the
order in which they are declared actually in the class itself (not using introspection).
This may be enhanced in the future to allow annotations or perhaps external meta data
configure the order of the indexes, as this may provide fine tuning options in special cases.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassFieldInspector
public ClassFieldInspector(Class<?> classUnderInspection)
throws IOException
- Parameters:
classUnderInspection
- The class that the fields to be shadowed are extracted for.
- Throws:
IOException
ClassFieldInspector
public ClassFieldInspector(Class<?> classUnderInspection,
boolean includeFinalMethods)
throws IOException
- Throws:
IOException
getFieldNames
public Map<String,Integer> getFieldNames()
- Return a mapping of the field "names" (ie bean property name convention)
to the numerical index by which they can be accessed.
isNonGetter
public boolean isNonGetter(String name)
- sotty:
Checks whether a returned field is actually a getter or not
- Parameters:
name
- the field to test
- Returns:
- true id the name does not correspond to a getter field
getFieldTypesField
public Map<String,Field> getFieldTypesField()
- Returns:
- A mapping of field types (unboxed).
getFieldTypes
public Map<String,Class<?>> getFieldTypes()
- Returns:
- A mapping of field types (unboxed).
getGetterMethods
public Map<String,Method> getGetterMethods()
- Returns:
- A mapping of methods for the getters.
getSetterMethods
public Map<String,Method> getSetterMethods()
- Returns:
- A mapping of methods for the getters.
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.