|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xanot.structure.XanotRule
org.xanot.structure.CreateInstanceRule
public class CreateInstanceRule
Create instance rule. This rule define what class should be instantiated when it encounters an xml element start.
| Constructor Summary | |
|---|---|
CreateInstanceRule(java.lang.String path,
java.lang.Class baseClass)
Creates a new CreateInstanceRule object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
createInstance()
Create an object instance based on the base class |
java.lang.Class |
getBaseClass()
Get the class to instantiate |
boolean |
isRepeatable()
Check wether the base class can be nested inside the same or child of this class |
boolean |
isRoot()
Check wether the base class is the root class. |
void |
setBaseClass(java.lang.Class baseClass)
Set the class to instantiate |
void |
setRepeatable(boolean repeatable)
Determine wether the base class can be nested inside the same or child of this class |
void |
setRoot(boolean root)
Determine wether the base class is the root class. |
java.lang.String |
toString()
Get string representation of this object. |
| Methods inherited from class org.xanot.structure.XanotRule |
|---|
getPath, setPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CreateInstanceRule(java.lang.String path,
java.lang.Class baseClass)
path - Path name, should be equals to the xml open tag name.baseClass - The class to instantiate| Method Detail |
|---|
public java.lang.Class getBaseClass()
public void setBaseClass(java.lang.Class baseClass)
baseClass - The baseClass to set.
public java.lang.Object createInstance()
throws java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.InstantiationException - Thrown when instantiating class.
java.lang.IllegalAccessException - Thrown when the class is not legally accessed.public boolean isRoot()
public void setRoot(boolean root)
root - The root to set.public boolean isRepeatable()
public void setRepeatable(boolean repeatable)
repeatable - The repeatable to set.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||