jess
Interface ClassResearcher

All Known Implementing Classes:
AndroidClassResearcher, DefaultClassResearcher

public interface ClassResearcher

The ClassResearcher is used to learn about a Java class mentioned in Jess source. By abstracting the notion of reflection into a separate class, we can use different reflection mechanisms in different situations. For example, in the JessDE, we can use Eclipse's own machinery instead of Java reflection, so that we can learn about classes without actually loading them.

(C) 2007 Sandia National Laboratories


Nested Class Summary
static class ClassResearcher.Property
           
 
Method Summary
 ClassResearcher.Property[] getBeanProperties(java.lang.String clazz)
          Return a list of the JavaBeans properties of a class.
 ClassResearcher.Property[] getPublicInstanceFields(java.lang.String clazz)
          Return a list of the public instance fields of a class.
 java.lang.String resolveClassName(java.lang.String clazz)
          Return the fully-qualified name of a class, based on Jess's current import tables.
 

Method Detail

getBeanProperties

ClassResearcher.Property[] getBeanProperties(java.lang.String clazz)
                                             throws java.lang.ClassNotFoundException,
                                                    JessException
Return a list of the JavaBeans properties of a class. The definition should be the same as used by the java.beans.Introspector class.

Parameters:
clazz - the name of the class to look at
Returns:
a list of Property objects describing the JavaBeans properties of the class
Throws:
java.lang.ClassNotFoundException - if the class can't be found
JessException - if anything else goes wrong

getPublicInstanceFields

ClassResearcher.Property[] getPublicInstanceFields(java.lang.String clazz)
                                                   throws java.lang.ClassNotFoundException,
                                                          JessException
Return a list of the public instance fields of a class.

Parameters:
clazz - the name of the class to look at
Returns:
a list of Property objects describing the public instance fields of the class
Throws:
java.lang.ClassNotFoundException - if the class can't be found
JessException - if anything else goes wrong

resolveClassName

java.lang.String resolveClassName(java.lang.String clazz)
                                  throws java.lang.ClassNotFoundException,
                                         JessException
Return the fully-qualified name of a class, based on Jess's current import tables.

Parameters:
clazz - the name of a class, either just the class part, or the fully-qualified name
Returns:
the full name of the class
Throws:
java.lang.ClassNotFoundException - if the class can't be found
JessException - if anything else goes wrong

© 2013 Sandia Corporation