|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xanot.AnnotationRuleBuilder
public class AnnotationRuleBuilder
Generate an object value and creation rule based on the annotation provided within the object model.
It start on a root object. The top most object that will be instantiated first.
The rule builder then will iterates through all public getter methods and member attributes.
| Constructor Summary | |
|---|---|
AnnotationRuleBuilder(java.lang.Class root)
Creates a new AnnotationRuleBuilder object. |
|
| Method Summary | |
|---|---|
void |
dumpRulesInfo()
Dump all information about rules this builder contains. |
AttributeSetRule |
getAttributeSetRule(java.lang.String path)
Get attribute setter with specified path. |
AttributeSetRule[] |
getAttributeSetRule(java.lang.String[] path)
Get array of AttributeSetRule that have a path similar to
an array of paths. |
CloseCollectionInstanceRule |
getCloseCollectionInstanceRule(java.lang.String path)
Get CloseCollectionInstanceRule with specified path. |
CloseCollectionInstanceRule[] |
getCloseCollectionInstanceRule(java.lang.String[] path)
Get array of CloseCollectionInstanceRule that have a path
similar to an array of paths. |
CloseInstanceRule |
getCloseInstanceRule(java.lang.String path)
Get closer instance with specified path. |
CloseInstanceRule[] |
getCloseInstanceRule(java.lang.String[] path)
Get array of CloseInstanceRule that have a path similar to
an array of paths. |
CreateInstanceRule |
getCreateInstanceRule(java.lang.String path)
Get CreateInstanceRule with specified path. |
CreateInstanceRule[] |
getCreateInstanceRule(java.lang.String[] path)
Get array of CreateInstanceRule that have a path similar
to an array of paths. |
ParentReferenceRule |
getParentReferenceRule(java.lang.String path)
Get ParentReferenceRule with specified path. |
ParentReferenceRule[] |
getParentReferenceRule(java.lang.String[] paths)
Get array of ParentReferenceRule that have a path similar
to an array of paths. |
PropertyCollectionSetRule |
getPropertyCollectionSetRule(java.lang.String path)
Get PropertyCollectionSetRule with specified path. |
PropertyCollectionSetRule[] |
getPropertyCollectionSetRule(java.lang.String[] path)
Get array of PropertyCollectionSetRule that have a path
similar to an array of paths. |
PropertySetRule |
getPropertySetRule(java.lang.String path)
Get PropertySetRule with specified path. |
PropertySetRule[] |
getPropertySetRule(java.lang.String[] path)
Get array of PropertySetRule that have a path similar to
an array of paths. |
java.lang.Class |
getRoot()
Get the root class |
java.util.List<XanotRule> |
getRules(java.lang.String path)
Get List of XanotRule with specified path. |
java.util.List<XanotRule> |
getRules(java.lang.String[] paths)
Get List of XanotRule that have a path similar to an array
of paths. |
static boolean |
isNativeWrapper(java.lang.Class klazz)
To check wether a class is extending or a wrapper class of native tipes. |
boolean |
isRoot(java.lang.Class klazz)
Check wether a class is a root class of the object model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationRuleBuilder(java.lang.Class root)
throws XanotException
root - The root class as the starting point.
XanotException - Thrown if there's an invalid usage of annotation according to
this implementation| Method Detail |
|---|
public java.lang.Class getRoot()
getRoot in interface RuleBuilderpublic void dumpRulesInfo()
public boolean isRoot(java.lang.Class klazz)
klazz - Class to check
public static boolean isNativeWrapper(java.lang.Class klazz)
klazz - The class to check.
public AttributeSetRule getAttributeSetRule(java.lang.String path)
getAttributeSetRule in interface RuleBuilderpath - Rule Path
public AttributeSetRule[] getAttributeSetRule(java.lang.String[] path)
AttributeSetRule that have a path similar to
an array of paths.
getAttributeSetRule in interface RuleBuilderpath - Array of paths.
AttributeSetRule that have a path similar
to the array of path.public CloseInstanceRule getCloseInstanceRule(java.lang.String path)
getCloseInstanceRule in interface RuleBuilderpath - The path
public CloseInstanceRule[] getCloseInstanceRule(java.lang.String[] path)
CloseInstanceRule that have a path similar to
an array of paths.
getCloseInstanceRule in interface RuleBuilderpath - Array of paths.
CloseInstanceRule that have a path
similar to the array of path.public CreateInstanceRule getCreateInstanceRule(java.lang.String path)
CreateInstanceRule with specified path.
getCreateInstanceRule in interface RuleBuilderpath - The path
CreateInstanceRule that it's path is equals to the
specified pathpublic CreateInstanceRule[] getCreateInstanceRule(java.lang.String[] path)
CreateInstanceRule that have a path similar
to an array of paths.
getCreateInstanceRule in interface RuleBuilderpath - Array of paths.
CreateInstanceRule that have a path
similar to the array of path.public PropertySetRule getPropertySetRule(java.lang.String path)
PropertySetRule with specified path.
getPropertySetRule in interface RuleBuilderpath - The path
PropertySetRule that it's path is equals to the
specified pathpublic PropertySetRule[] getPropertySetRule(java.lang.String[] path)
PropertySetRule that have a path similar to
an array of paths.
getPropertySetRule in interface RuleBuilderpath - Array of paths.
PropertySetRule that have a path similar
to the array of path.public CloseCollectionInstanceRule getCloseCollectionInstanceRule(java.lang.String path)
CloseCollectionInstanceRule with specified path.
getCloseCollectionInstanceRule in interface RuleBuilderpath - The path
CloseCollectionInstanceRule that it's path is
equals to the specified pathpublic CloseCollectionInstanceRule[] getCloseCollectionInstanceRule(java.lang.String[] path)
CloseCollectionInstanceRule that have a path
similar to an array of paths.
getCloseCollectionInstanceRule in interface RuleBuilderpath - Array of paths.
CloseCollectionInstanceRule that have a
path similar to the array of path.public PropertyCollectionSetRule getPropertyCollectionSetRule(java.lang.String path)
PropertyCollectionSetRule with specified path.
getPropertyCollectionSetRule in interface RuleBuilderpath - The path
PropertyCollectionSetRule that it's path is equals
to the specified pathpublic PropertyCollectionSetRule[] getPropertyCollectionSetRule(java.lang.String[] path)
PropertyCollectionSetRule that have a path
similar to an array of paths.
getPropertyCollectionSetRule in interface RuleBuilderpath - Array of paths.
PropertyCollectionSetRule that have a
path similar to the array of path.public ParentReferenceRule getParentReferenceRule(java.lang.String path)
ParentReferenceRule with specified path.
getParentReferenceRule in interface RuleBuilderpath - The path
ParentReferenceRule that it's path is equals to
the specified pathpublic ParentReferenceRule[] getParentReferenceRule(java.lang.String[] paths)
ParentReferenceRule that have a path similar
to an array of paths.
getParentReferenceRule in interface RuleBuilderpath - Array of paths.
ParentReferenceRule that have a path
similar to the array of path.public java.util.List<XanotRule> getRules(java.lang.String path)
XanotRule with specified path.
getRules in interface RuleBuilderpath - The path
XanotRule that it's path is equals to the
specified pathpublic java.util.List<XanotRule> getRules(java.lang.String[] paths)
XanotRule that have a path similar to an array
of paths.
getRules in interface RuleBuilderpaths - Array of paths.
XanotRule that have a path similar to the
array of path.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||