|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.schema.codegen.extend.NameMatchDecoratorBase
org.jibx.schema.codegen.extend.ExtensionDecorator
public class ExtensionDecorator
Code generation decorator which matches on the generated class name, and when it finds a matching class it sets a superclass. This also supports setting several of the object attributes on the binding element for the class (which must be a normal data class, rather than an enumeration).
Field Summary | |
---|---|
private java.lang.String |
m_baseClass
Base class to be set for matched classes. |
private java.lang.String |
m_postSetName
Name of method to be called after an instance of class is unmarshalled ( null if none). |
private java.lang.String |
m_preGetName
Name of method to be called before an instance of class is marshalled ( null if none). |
private java.lang.String |
m_preSetName
Name of method to be called before an instance of class is unmarshalled ( null if none). |
Constructor Summary | |
---|---|
ExtensionDecorator()
|
Method Summary | |
---|---|
void |
finish(ElementBase binding,
IClassHolder holder)
Method called after completing code generation for the target class. |
void |
setBaseClass(java.lang.String name)
Set base class to be set for matched classes. |
void |
setPostSet(java.lang.String name)
Set name of method to be called after an instance of class is unmarshalled. |
void |
setPreGet(java.lang.String name)
Set name of method to be called before an instance of class is marshalled. |
void |
setPreSet(java.lang.String name)
Set name of method to be called before an instance of class is unmarshalled. |
void |
start(IClassHolder holder)
Method called before starting code generation for the target class. |
void |
valueAdded(java.lang.String basename,
boolean collect,
java.lang.String type,
FieldDeclaration field,
MethodDeclaration getmeth,
MethodDeclaration setmeth,
java.lang.String descript,
IClassHolder holder)
Method called after adding each data value to class. |
Methods inherited from class org.jibx.schema.codegen.extend.NameMatchDecoratorBase |
---|
matchName, setMatchName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String m_baseClass
private java.lang.String m_postSetName
null
if none).
private java.lang.String m_preSetName
null
if none).
private java.lang.String m_preGetName
null
if none).
Constructor Detail |
---|
public ExtensionDecorator()
Method Detail |
---|
public void setBaseClass(java.lang.String name)
name
- public void setPostSet(java.lang.String name)
name
- public void setPreSet(java.lang.String name)
name
- public void setPreGet(java.lang.String name)
name
- public void finish(ElementBase binding, IClassHolder holder)
binding
- holder
- public void start(IClassHolder holder)
holder
- public void valueAdded(java.lang.String basename, boolean collect, java.lang.String type, FieldDeclaration field, MethodDeclaration getmeth, MethodDeclaration setmeth, java.lang.String descript, IClassHolder holder)
basename
- base name used for data valuecollect
- repeated value flagtype
- value type (item value type, in the case of a repeated value)field
- actual fieldgetmeth
- read access methodsetmeth
- write access methoddescript
- value description textholder
-
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |