public class ValueChild extends java.lang.Object implements IComponent
String
. Content values include both elements with only character
data content and text, as character data content or CDATA sections.Modifier and Type | Field and Description |
---|---|
(package private) static int |
ATTRIBUTE_STYLE |
(package private) static int |
AUTO_IDENT |
private static java.lang.String[] |
BACKFILL_INTERFACES |
private static Type[] |
BACKFILL_METHODARGS |
private static java.lang.String |
BACKFILL_METHODNAME |
private static java.lang.String |
BACKFILL_SUFFIX
Prefix used for backfill classes.
|
private static java.lang.String |
BOUNDREF_NAME |
(package private) static int |
CDATA_STYLE |
private static java.lang.String |
CHECK_ATTRIBUTE_NAME |
private static java.lang.String |
CHECK_ELEMENT_NAME |
private static java.lang.String |
CHECK_SIGNATURE |
(package private) static int |
DEF_IDENT |
private static java.lang.String |
DEFINE_ID_NAME |
private static java.lang.String |
DEFINE_ID_SIGNATURE |
(package private) static int |
DIRECT_IDENT |
(package private) static int |
ELEMENT_STYLE |
private java.lang.String |
m_constantValue
Constant value.
|
private IContainer |
m_container
Containing binding definition structure.
|
private StringConversion |
m_conversion
Conversion handling for value.
|
private int |
m_identType
Ident type code.
|
private IMapping |
m_idRefMap
Mapping definition for object class supplying identifier.
|
private boolean |
m_isNillable
Nillable element flag.
|
private NameDefinition |
m_name
Attribute or element name information.
|
private IContextObj |
m_objContext
Containing object context.
|
private PropertyDefinition |
m_property
Linked property information.
|
private java.lang.String |
m_type
Fully qualified name of type.
|
private int |
m_valueStyle
Value style code.
|
protected static java.lang.String |
MARSHAL_ATTRIBUTE |
private static java.lang.String |
MARSHAL_CDATA_NAME |
protected static java.lang.String |
MARSHAL_CLOSESTART_EMPTY |
protected static java.lang.String |
MARSHAL_CLOSESTART_EMPTY_SIGNATURE |
protected static java.lang.String |
MARSHAL_ELEMENT |
protected static java.lang.String |
MARSHAL_SIGNATURE |
protected static java.lang.String |
MARSHAL_STARTTAG_ATTRIBUTES |
protected static java.lang.String |
MARSHAL_STARTTAG_SIGNATURE |
private static java.lang.String |
MARSHAL_TEXT_NAME |
private static java.lang.String |
MARSHAL_TEXT_SIGNATURE |
(package private) static int |
REF_IDENT |
private static java.lang.String |
REGISTER_BACKFILL_NAME |
private static java.lang.String |
REGISTER_BACKFILL_SIGNATURE |
(package private) static int |
TEXT_STYLE |
protected static java.lang.String |
UNMARSHAL_ATTRIBUTE_BOOLEAN_NAME |
protected static java.lang.String |
UNMARSHAL_ATTRIBUTE_BOOLEAN_SIGNATURE |
private static java.lang.String |
UNMARSHAL_DEFREF_ATTR_NAME |
private static java.lang.String |
UNMARSHAL_DEFREF_ELEM_NAME |
private static java.lang.String |
UNMARSHAL_DEFREF_SIGNATURE |
private static java.lang.String |
UNMARSHAL_ELEMENT_TEXT_NAME |
private static java.lang.String |
UNMARSHAL_ELEMENT_TEXT_SIGNATURE |
private static java.lang.String |
UNMARSHAL_FWDREF_ATTR_NAME |
private static java.lang.String |
UNMARSHAL_FWDREF_ELEM_NAME |
private static java.lang.String |
UNMARSHAL_PARSE_IF_START_NAME |
private static java.lang.String |
UNMARSHAL_PARSE_IF_START_SIGNATURE |
private static java.lang.String |
UNMARSHAL_PARSE_PAST_END_NAME |
private static java.lang.String |
UNMARSHAL_PARSE_PAST_END_SIGNATURE |
private static java.lang.String |
UNMARSHAL_PARSE_TO_START_NAME |
private static java.lang.String |
UNMARSHAL_PARSE_TO_START_SIGNATURE |
protected static java.lang.String |
UNMARSHAL_REQ_ATTRIBUTE |
protected static java.lang.String |
UNMARSHAL_REQ_SIGNATURE |
private static java.lang.String |
UNMARSHAL_SKIPELEMENTMETHOD |
private static java.lang.String |
UNMARSHAL_SKIPELEMENTSIGNATURE |
private static java.lang.String |
UNMARSHAL_TEXT_NAME |
private static java.lang.String |
UNMARSHAL_TEXT_SIGNATURE |
private static java.lang.String |
UNMARSHALLING_THROWEXCEPTION_METHOD |
private static java.lang.String |
UNMARSHALLING_THROWEXCEPTION_SIGNATURE |
Constructor and Description |
---|
ValueChild(IContainer contain,
IContextObj objc,
NameDefinition name,
PropertyDefinition prop,
StringConversion conv,
int style,
int ident,
java.lang.String constant,
boolean nillable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private ClassFile |
createBackfillClass()
Create backfill handler class if it does not already exist.
|
void |
genAttributeMarshal(ContextMethodBuilder mb)
Generate attribute marshalling code.
|
void |
genAttributeUnmarshal(ContextMethodBuilder mb)
Generate attribute unmarshalling code.
|
void |
genAttrPresentTest(ContextMethodBuilder mb)
Generate code to test for attribute present.
|
void |
genContentMarshal(ContextMethodBuilder mb)
Generate element or text marshalling code.
|
void |
genContentPresentTest(ContextMethodBuilder mb)
Generate code to test for content present.
|
void |
genContentUnmarshal(ContextMethodBuilder mb)
Generate element or text unmarshalling code.
|
void |
genIfPresentTest(UnmarshalBuilder mb)
Generate test if present code.
|
void |
genLoadId(ContextMethodBuilder mub)
Generate code to load ID value of instance to stack.
|
private void |
genMarshal(ContextMethodBuilder mb)
Generate marshalling code.
|
void |
genNewInstance(ContextMethodBuilder mb)
Generate code to create new instance of object.
|
private void |
genParseIdRef(ContextMethodBuilder mb)
Generate unmarshalling code for object identifier reference.
|
private void |
genUnmarshal(ContextMethodBuilder mb)
Generate unmarshalling code.
|
java.lang.String |
getPropertyName()
Get property name.
|
java.lang.String |
getType()
Get type expected by component.
|
NameDefinition |
getWrapperName()
Get element wrapper name.
|
boolean |
hasAttribute()
Check if component defines one or more attribute values of the
containing element.
|
boolean |
hasContent()
Check if component defines one or more elements or text values as
children of the containing element.
|
boolean |
hasId()
Check if component defines an ID value for instances of context object.
|
boolean |
isImplicit()
Check if implicit.
|
boolean |
isOptional()
Check if component is an optional item.
|
void |
print(int depth) |
void |
setLinkages()
Establish and validate linkages between binding components.
|
void |
switchProperty()
Switch property from "this" to "implicit".
|
static final int DIRECT_IDENT
static final int AUTO_IDENT
static final int DEF_IDENT
static final int REF_IDENT
static final int ATTRIBUTE_STYLE
static final int ELEMENT_STYLE
static final int TEXT_STYLE
static final int CDATA_STYLE
private static final java.lang.String BACKFILL_SUFFIX
private static final java.lang.String[] BACKFILL_INTERFACES
private static final java.lang.String BACKFILL_METHODNAME
private static final Type[] BACKFILL_METHODARGS
private static final java.lang.String BOUNDREF_NAME
private static final java.lang.String CHECK_ELEMENT_NAME
private static final java.lang.String CHECK_ATTRIBUTE_NAME
private static final java.lang.String CHECK_SIGNATURE
private static final java.lang.String UNMARSHAL_DEFREF_ATTR_NAME
private static final java.lang.String UNMARSHAL_DEFREF_ELEM_NAME
private static final java.lang.String UNMARSHAL_FWDREF_ATTR_NAME
private static final java.lang.String UNMARSHAL_FWDREF_ELEM_NAME
private static final java.lang.String UNMARSHAL_DEFREF_SIGNATURE
private static final java.lang.String REGISTER_BACKFILL_NAME
private static final java.lang.String REGISTER_BACKFILL_SIGNATURE
private static final java.lang.String DEFINE_ID_NAME
private static final java.lang.String DEFINE_ID_SIGNATURE
protected static final java.lang.String UNMARSHAL_REQ_ATTRIBUTE
protected static final java.lang.String UNMARSHAL_REQ_SIGNATURE
private static final java.lang.String UNMARSHAL_TEXT_NAME
private static final java.lang.String UNMARSHAL_TEXT_SIGNATURE
private static final java.lang.String UNMARSHAL_ELEMENT_TEXT_NAME
private static final java.lang.String UNMARSHAL_ELEMENT_TEXT_SIGNATURE
private static final java.lang.String UNMARSHAL_PARSE_IF_START_NAME
private static final java.lang.String UNMARSHAL_PARSE_IF_START_SIGNATURE
private static final java.lang.String UNMARSHAL_PARSE_TO_START_NAME
private static final java.lang.String UNMARSHAL_PARSE_TO_START_SIGNATURE
private static final java.lang.String UNMARSHAL_PARSE_PAST_END_NAME
private static final java.lang.String UNMARSHAL_PARSE_PAST_END_SIGNATURE
private static final java.lang.String UNMARSHAL_SKIPELEMENTMETHOD
private static final java.lang.String UNMARSHAL_SKIPELEMENTSIGNATURE
private static final java.lang.String MARSHAL_TEXT_NAME
private static final java.lang.String MARSHAL_CDATA_NAME
private static final java.lang.String MARSHAL_TEXT_SIGNATURE
private static final java.lang.String UNMARSHALLING_THROWEXCEPTION_METHOD
private static final java.lang.String UNMARSHALLING_THROWEXCEPTION_SIGNATURE
protected static final java.lang.String MARSHAL_ATTRIBUTE
protected static final java.lang.String MARSHAL_ELEMENT
protected static final java.lang.String MARSHAL_SIGNATURE
protected static final java.lang.String MARSHAL_STARTTAG_ATTRIBUTES
protected static final java.lang.String MARSHAL_STARTTAG_SIGNATURE
protected static final java.lang.String MARSHAL_CLOSESTART_EMPTY
protected static final java.lang.String MARSHAL_CLOSESTART_EMPTY_SIGNATURE
protected static final java.lang.String UNMARSHAL_ATTRIBUTE_BOOLEAN_NAME
protected static final java.lang.String UNMARSHAL_ATTRIBUTE_BOOLEAN_SIGNATURE
private final IContainer m_container
private final IContextObj m_objContext
private final int m_valueStyle
private final java.lang.String m_constantValue
private final int m_identType
private final NameDefinition m_name
private final java.lang.String m_type
private final boolean m_isNillable
private final PropertyDefinition m_property
private final StringConversion m_conversion
private IMapping m_idRefMap
public ValueChild(IContainer contain, IContextObj objc, NameDefinition name, PropertyDefinition prop, StringConversion conv, int style, int ident, java.lang.String constant, boolean nillable)
contain
- containing binding definition structureobjc
- containing object contextname
- element or attribute name information (may be
null
)prop
- property reference informationconv
- string conversion handlerstyle
- value style codeident
- identifier type codeconstant
- value for constantnillable
- nillable element flagprivate ClassFile createBackfillClass() throws JiBXException
JiBXException
- if error in configurationprivate void genParseIdRef(ContextMethodBuilder mb) throws JiBXException
mb
- method builderJiBXException
- if error in configurationpublic void genIfPresentTest(UnmarshalBuilder mb) throws JiBXException
mb
- unmarshal method builderJiBXException
- if configuration errorprivate void genUnmarshal(ContextMethodBuilder mb) throws JiBXException
mb
- method builderJiBXException
- if error in configurationprivate void genMarshal(ContextMethodBuilder mb) throws JiBXException
mb
- method builderJiBXException
- if error in configurationpublic java.lang.String getPropertyName()
public boolean isImplicit()
true
if implicit, false
if notpublic void switchProperty()
public boolean isOptional()
IComponent
isOptional
in interface IComponent
true
if optional, false
if requiredpublic boolean hasAttribute()
IComponent
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
containing element, false
if notpublic void genAttrPresentTest(ContextMethodBuilder mb) throws JiBXException
IComponent
genAttrPresentTest
in interface IComponent
mb
- method builderJiBXException
- if configuration errorpublic void genAttributeUnmarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genAttributeUnmarshal
in interface IComponent
mb
- method builderJiBXException
- if error in configurationpublic void genAttributeMarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genAttributeMarshal
in interface IComponent
mb
- method builderJiBXException
- if error in configurationpublic boolean hasContent()
IComponent
ILinkable.setLinkages()
.hasContent
in interface IComponent
true
if one or more content values defined
for containing element, false
if notpublic void genContentPresentTest(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentPresentTest
in interface IComponent
mb
- method builderJiBXException
- if configuration errorpublic void genContentUnmarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentUnmarshal
in interface IComponent
mb
- method builderJiBXException
- if error in configurationpublic void genContentMarshal(ContextMethodBuilder mb) throws JiBXException
IComponent
genContentMarshal
in interface IComponent
mb
- method builderJiBXException
- if error in configurationpublic void genNewInstance(ContextMethodBuilder mb)
IComponent
genNewInstance
in interface IComponent
mb
- method builderpublic java.lang.String getType()
IComponent
getType
in interface IComponent
public boolean hasId()
IComponent
hasId
in interface IComponent
true
if ID value defined for instances,
false
if notpublic void genLoadId(ContextMethodBuilder mub) throws JiBXException
IComponent
String
).genLoadId
in interface IComponent
mub
- method builderJiBXException
- if configuration errorpublic NameDefinition getWrapperName()
IComponent
getWrapperName
in interface IComponent
null
if no wrapper elementpublic void setLinkages() throws JiBXException
ILinkable
setLinkages
in interface ILinkable
JiBXException
- if error in configurationpublic void print(int depth)
print
in interface IComponent