|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.def.PropertyDefinition
public class PropertyDefinition
Property definition from binding. This organizes shared information for bindings linked to fields or get/set methods of an object, and provides methods for related code generation.
| Constructor Summary | |
|---|---|
PropertyDefinition(IContainer parent,
IContextObj obj,
String type,
boolean isthis,
boolean opt,
String fname,
String test,
String flag,
String get,
String set)
Constructor. |
|
PropertyDefinition(IContextObj obj,
boolean opt)
Constructor for "this" object reference. |
|
PropertyDefinition(PropertyDefinition original)
Copy constructor. |
|
PropertyDefinition(String type,
IContextObj obj,
boolean opt)
Constructor for implicit object reference. |
|
| Method Summary | |
|---|---|
void |
genFlag(MethodBuilder mb)
Generate code to call flag method with value on stack. |
void |
genLoad(ContextMethodBuilder mb)
Generate code to load property value to stack. |
void |
genStore(MethodBuilder mb)
Generate code to store property value from stack. |
BranchWrapper |
genTest(ContextMethodBuilder mb)
Generate code to test if property is present. |
String |
getGetValueType()
Get value type as fully qualified name for loaded property value. |
String |
getName()
Get property name. |
String |
getSetValueType()
Get value type as fully qualified name for stored property value. |
String |
getTypeName()
Get declared type fully qualified name. |
boolean |
hasFlag()
Check if property has flag method. |
boolean |
hasTest()
Check if property has presence test. |
boolean |
isFlagOnly()
Check if property is flag only. |
boolean |
isImplicit()
Check if property is implicit value from collection. |
boolean |
isLoadable()
Check if the value can be loaded. |
boolean |
isOptional()
Check if property is optional. |
boolean |
isTestOnly()
Check if property is test only. |
boolean |
isThis()
Check if property is "this" reference for object. |
void |
setOptional(boolean opt)
Set flag for an optional property. |
void |
switchProperty()
Switch property from "this" to "implicit". |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyDefinition(IContainer parent,
IContextObj obj,
String type,
boolean isthis,
boolean opt,
String fname,
String test,
String flag,
String get,
String set)
throws JiBXException
parent - containing binding definition structureobj - containing object contexttype - fully qualified name of typeisthis - "this" object reference flagopt - optional property flagfname - containing object field name for property (may be
null)test - containing object method to test for property present (may be
null)flag - containing object method to flag property present (may be
null)get - containing object method to get property value (may be
null)set - containing object method to set property value (may be
null)
JiBXException - if configuration error
public PropertyDefinition(IContextObj obj,
boolean opt)
obj - containing object contextopt - optional property flag
public PropertyDefinition(String type,
IContextObj obj,
boolean opt)
type - object type suppliedobj - containing object contextopt - optional property flagpublic PropertyDefinition(PropertyDefinition original)
original - | Method Detail |
|---|
public boolean isThis()
true if reference to "this", false if
notpublic boolean isImplicit()
true if implicit, false if notpublic void switchProperty()
public boolean isOptional()
true if optional, false if requiredpublic void setOptional(boolean opt)
opt - true if optional property, false if
notpublic boolean isLoadable()
true if loadable, false if notpublic String getName()
public String getTypeName()
public String getGetValueType()
public String getSetValueType()
public boolean hasTest()
true if presence test needed, false if
notpublic boolean isTestOnly()
true if test-only property, false if
notpublic boolean hasFlag()
true if flag method defined, false if
notpublic boolean isFlagOnly()
true if flag-only property, false if
notpublic BranchWrapper genTest(ContextMethodBuilder mb)
mb - method builder
public void genFlag(MethodBuilder mb)
throws JiBXException
mb - method builder
JiBXException - if configuration error
public void genLoad(ContextMethodBuilder mb)
throws JiBXException
mb - method builder
JiBXException - if configuration error
public void genStore(MethodBuilder mb)
throws JiBXException
mb - method builder
JiBXException - if configuration errorpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||