org.jibx.binding.def
Class ComponentProperty

java.lang.Object
  extended by org.jibx.binding.def.PassThroughComponent
      extended by org.jibx.binding.def.ComponentProperty
All Implemented Interfaces:
IComponent

public class ComponentProperty
extends PassThroughComponent

Property reference with binding defined by component. This handles loading and storing the property value, calling the wrapped component methods for everything else.

Version:
1.0
Author:
Dennis M. Sosnoski

Field Summary
private  PropertyDefinition m_property
          Property definition.
private  boolean m_skipMarshal
          Skip marshalling code tests flag.
 
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
 
Constructor Summary
ComponentProperty(PropertyDefinition prop, IComponent impl, boolean skip)
          Constructor.
 
Method Summary
 void genAttributeMarshal(ContextMethodBuilder mb)
          Generate attribute marshalling code.
 void genAttributeUnmarshal(ContextMethodBuilder mb)
          Generate attribute unmarshalling code.
 void genContentMarshal(ContextMethodBuilder mb)
          Generate element or text marshalling code.
 void genContentUnmarshal(ContextMethodBuilder mb)
          Generate element or text unmarshalling code.
 boolean isOptional()
          Check if component is an optional item.
 void print(int depth)
           
 void setSkipping(boolean skip)
          Set flag for skipping marshalling presence test code generation.
 
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttrPresentTest, genContentPresentTest, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, setLinkages, setWrappedComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_property

private final PropertyDefinition m_property
Property definition.


m_skipMarshal

private boolean m_skipMarshal
Skip marshalling code tests flag.

Constructor Detail

ComponentProperty

public ComponentProperty(PropertyDefinition prop,
                         IComponent impl,
                         boolean skip)
Constructor.

Parameters:
prop - actual property definition
impl - component that defines marshalling and unmarshalling
skip - flag for marshalling code tests to be skipped
Method Detail

setSkipping

public void setSkipping(boolean skip)
Set flag for skipping marshalling presence test code generation.

Parameters:
skip - true if skipping, false if not

isOptional

public boolean isOptional()
Description copied from interface: IComponent
Check if component is an optional item.

Specified by:
isOptional in interface IComponent
Overrides:
isOptional in class PassThroughComponent
Returns:
true if optional, false if required

genAttributeUnmarshal

public void genAttributeUnmarshal(ContextMethodBuilder mb)
                           throws JiBXException
Description copied from interface: IComponent
Generate attribute unmarshalling code. This is called within the code generation for the unmarshaller of the class associated with the containing element. It needs to generate the necessary code for handling the unmarshalling operation, leaving the unmarshalled object reference on the stack.

Specified by:
genAttributeUnmarshal in interface IComponent
Overrides:
genAttributeUnmarshal in class PassThroughComponent
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genAttributeMarshal

public void genAttributeMarshal(ContextMethodBuilder mb)
                         throws JiBXException
Description copied from interface: IComponent
Generate attribute marshalling code. This is called within the code generation for the marshaller of the class associated with the containing element. It needs to generate the necessary code for handling the marshalling operation, consuming the marshalled object reference from the stack.

Specified by:
genAttributeMarshal in interface IComponent
Overrides:
genAttributeMarshal in class PassThroughComponent
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genContentUnmarshal

public void genContentUnmarshal(ContextMethodBuilder mb)
                         throws JiBXException
Description copied from interface: IComponent
Generate element or text unmarshalling code. This is called within the code generation for the unmarshaller of the class associated with the containing element. It needs to generate the necessary code for handling the unmarshalling operation, leaving the unmarshalled object reference on the stack.

Specified by:
genContentUnmarshal in interface IComponent
Overrides:
genContentUnmarshal in class PassThroughComponent
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genContentMarshal

public void genContentMarshal(ContextMethodBuilder mb)
                       throws JiBXException
Description copied from interface: IComponent
Generate element or text marshalling code. This is called within the code generation for the marshaller of the class associated with the containing element. It needs to generate the necessary code for handling the marshalling operation, consuming the marshalled object reference from the stack.

Specified by:
genContentMarshal in interface IComponent
Overrides:
genContentMarshal in class PassThroughComponent
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

print

public void print(int depth)
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent


Project Web Site