public class CollectionMethodsDecorator
extends org.jibx.schema.codegen.extend.NameMatchDecoratorBase
implements org.jibx.schema.codegen.extend.ClassDecorator
sizeXXX()
, addXXX(YYY)
getXXX(int)
, and
clearXXX()
methods for each collection value using a java.util.List
representation. In a
change from the original version of this class, the form of the name used for the sizeXXX()
and
clearXXX()
methods is based on the supplied getXXX()
method, which normally uses a plural
form of the name.Constructor and Description |
---|
CollectionMethodsDecorator() |
Modifier and Type | Method and Description |
---|---|
void |
finish(org.jibx.binding.model.ElementBase binding,
org.jibx.schema.codegen.IClassHolder holder)
Method called after completing code generation for the target class.
|
void |
start(org.jibx.schema.codegen.IClassHolder holder)
Method called before starting code generation for the target class.
|
void |
valueAdded(String basename,
boolean collect,
String type,
org.eclipse.jdt.core.dom.FieldDeclaration field,
org.eclipse.jdt.core.dom.MethodDeclaration getmeth,
org.eclipse.jdt.core.dom.MethodDeclaration setmeth,
String descript,
org.jibx.schema.codegen.IClassHolder holder)
Method called after adding each data value to class.
|
public void finish(org.jibx.binding.model.ElementBase binding, org.jibx.schema.codegen.IClassHolder holder)
finish
in interface org.jibx.schema.codegen.extend.ClassDecorator
binding
- holder
- public void start(org.jibx.schema.codegen.IClassHolder holder)
start
in interface org.jibx.schema.codegen.extend.ClassDecorator
holder
- public void valueAdded(String basename, boolean collect, String type, org.eclipse.jdt.core.dom.FieldDeclaration field, org.eclipse.jdt.core.dom.MethodDeclaration getmeth, org.eclipse.jdt.core.dom.MethodDeclaration setmeth, String descript, org.jibx.schema.codegen.IClassHolder holder)
valueAdded
in interface org.jibx.schema.codegen.extend.ClassDecorator
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 method (null
if a flag value)setmeth
- write access method (null
if a flag value)descript
- value description textholder
- Copyright © 2016. All Rights Reserved.