|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.xml.nut.NutDescriptor
public class NutDescriptor
This class is the descriptor for a Nut class.
| Method Summary | |
|---|---|
java.lang.Object |
createNut()
To create a Nut object represented by this descriptor. |
boolean |
equals(java.lang.Object obj)
|
java.lang.reflect.Method |
getAdder(java.lang.String name)
To get the adder method for a given name. |
java.lang.Class |
getAdderType(java.lang.String name)
To get the parameter type for a given adder method. |
java.lang.reflect.Method |
getAnonymousAdder(java.lang.Object arg)
Get the adder method for adding sub-elements anonymously. |
Evaluator |
getEvaluator()
Get the Evaluator object that evaluates a Nut object. |
java.util.Map |
getPropertyDescriptors()
Get a map of the property descriptors for this type. |
java.lang.reflect.Method |
getSetter()
If the Nut is a collection nut, get the method corresponding to the set method. |
java.lang.Class |
getSetterElementType()
If the Nut is a collection nut, get the element type of the array parameter for the set method. |
NutDescriptor |
getSubDescriptor(java.lang.String name)
Get the NutDescriptor object for a given sub-element. |
java.lang.Class |
getType()
Get the Nut type. |
int |
hashCode()
|
boolean |
isCollectionNut()
Is this a collection nut? |
void |
setFactory(Factory factory)
To set the factory object that is responsible for creating the nut instance instead of invoking the default constructor. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.lang.reflect.Method getAdder(java.lang.String name)
name - the name of the adder.
public java.lang.reflect.Method getAnonymousAdder(java.lang.Object arg)
arg - the argument to be added.
java.lang.IllegalArgumentException - if a method cannot be found for the given argument
or if ambiguity happens.public java.lang.Class getAdderType(java.lang.String name)
name - the name of the adder.
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isCollectionNut()
A collection nut is one that has a set with
an array parameter.
public Evaluator getEvaluator()
public java.lang.Class getType()
public java.util.Map getPropertyDescriptors()
public NutDescriptor getSubDescriptor(java.lang.String name)
name - the name of the sub-element.
public java.lang.reflect.Method getSetter()
set method.
public java.lang.Class getSetterElementType()
set method.
For example, getSetterElementType() returns String
if the type has a public void set(String[]) method.
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public java.lang.Object createNut()
throws java.lang.IllegalAccessException,
java.lang.InstantiationException
java.lang.IllegalAccessException - if access is denied.
java.lang.InstantiationException - if instantiation failed.public void setFactory(Factory factory)
factory - the factory object.
Setting it to null means that the default constructor is used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||