freemarker.ext.beans2
Interface Features<T>

All Known Implementing Classes:
ClassFeatures, ObjectFeatures

public interface Features<T>

Features encapsulate the methods, properties, and fields of a class or object. This provides quick access to all features indexed by name.

Since:
1.9
Version:
$Id: Features.java 1067 2011-06-06 10:55:28Z run2000 $
Author:
Nicholas Cull

Method Summary
 T[] getEnumValues()
          Get an array of all enumeration values for the enum class.
 java.lang.reflect.Field getField(java.lang.String name)
          Get a Field object for the given name.
 java.util.List<java.lang.reflect.Method> getMethods(java.lang.String name)
          Get a list of all methods for the given name.
 java.beans.PropertyDescriptor getProperty(java.lang.String name)
          Get a PropertyDescriptor object for the given name.
 

Method Detail

getMethods

java.util.List<java.lang.reflect.Method> getMethods(java.lang.String name)
Get a list of all methods for the given name. There may be several overloaded methods for a given name.

Parameters:
name - the name of the method to be retrieved
Returns:
a List of Method objects for the given name

getProperty

java.beans.PropertyDescriptor getProperty(java.lang.String name)
Get a PropertyDescriptor object for the given name. Property names are unique for a given class, so no overloading is required.

Parameters:
name - the name of the property to be retrieved
Returns:
a PropertyDescriptor for the given name

getField

java.lang.reflect.Field getField(java.lang.String name)
Get a Field object for the given name. Field names are unique for a given class, so no overloading is required.

Parameters:
name - the name of the field to be retrieved
Returns:
a Field object for the given name

getEnumValues

T[] getEnumValues()
Get an array of all enumeration values for the enum class.

Returns:
an array of all enumerated values for this class, or null if the class is not an enum