站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

ClassFieldInspector (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.util.asm
Class ClassFieldInspector

java.lang.Object
  extended by org.drools.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.

Author:
Michael Neale

Constructor Summary
ClassFieldInspector(Class clazz)
           
ClassFieldInspector(Class clazz, boolean includeFinalMethods)
           
 
Method Summary
 Map getFieldNames()
          Return a mapping of the field "names" (ie bean property name convention) to the numerical index by which they can be accessed.
 Map getFieldTypes()
           
 Map getGetterMethods()
           
 List getPropertyGetters()
          Return a list in order of which the getters (and "is") methods were found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFieldInspector

public ClassFieldInspector(Class clazz)
                    throws IOException
Parameters:
clazz - The class that the fields to be shadowed are extracted for.
Throws:
IOException

ClassFieldInspector

public ClassFieldInspector(Class clazz,
                           boolean includeFinalMethods)
                    throws IOException
Throws:
IOException
Method Detail

getPropertyGetters

public List getPropertyGetters()
Return a list in order of which the getters (and "is") methods were found. This should only be done once when compiling a rulebase ideally.


getFieldNames

public Map getFieldNames()
Return a mapping of the field "names" (ie bean property name convention) to the numerical index by which they can be accessed.


getFieldTypes

public Map getFieldTypes()
Returns:
A mapping of field types (unboxed).

getGetterMethods

public Map getGetterMethods()
Returns:
A mapping of methods for the getters.


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.