org.apache.ws.jaxme.generator.sg.impl
Class PropertySGImpl

java.lang.Object
  extended byorg.apache.ws.jaxme.generator.sg.impl.PropertySGImpl
All Implemented Interfaces:
PropertySG

public class PropertySGImpl
extends java.lang.Object
implements PropertySG


Constructor Summary
PropertySGImpl(PropertySGChain o)
           
 
Method Summary
 void addValue(JavaMethod p0, DirectAccessible p1, java.lang.Object p2, JavaQName p3)
          Creates a piece of Java code adding an element value.
 void forAllNonNullValues(JavaMethod p0, DirectAccessible p1, SGlet p2)
          Invokes the given SGlet for any non null value.
 void forAllValues(JavaMethod p0, DirectAccessible p1, SGlet p2)
          Invokes the given SGlet for any value.
 void generate(JavaSource p0)
          Generates the property setters and getters.
 java.lang.String getCollectionType()
          Returns the properties collection type.
 PropertySGChain getHeadOfChain()
           
 java.lang.Object getValue(DirectAccessible p0)
          Returns a piece of Java code with the property value.
 JavaField getXMLField(JavaSource p0)
          Creates the Java field holding the objects property value.
 java.lang.String getXMLFieldName()
          Returns the objects property name.
 JavaMethod getXMLGetMethod(JavaSource p0)
          Creates the getter returning the property value.
 java.lang.String getXMLGetMethodName()
          Returns the objects getter name.
 JavaMethod getXMLIsSetMethod(JavaSource p0)
          Creates the isSet returning whether the property value is set or not.
 java.lang.String getXMLIsSetMethodName()
          Returns the name of the objects "isSet" method.
 JavaMethod getXMLSetMethod(JavaSource p0)
          Creates the setter returning the property value.
 java.lang.String getXMLSetMethodName()
          Returns the objects setter name.
 boolean hasIsSetMethod()
          Returns whether the property has an "is set" method.
 void init()
          Initializes the PropertySG.
 void setValue(JavaMethod p0, DirectAccessible p1, java.lang.Object p2, JavaQName p3)
          Creates a piece of Java code setting the elements property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySGImpl

public PropertySGImpl(PropertySGChain o)
Method Detail

generate

public void generate(JavaSource p0)
              throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Generates the property setters and getters.

Specified by:
generate in interface PropertySG
Throws:
org.xml.sax.SAXException

forAllNonNullValues

public void forAllNonNullValues(JavaMethod p0,
                                DirectAccessible p1,
                                SGlet p2)
                         throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Invokes the given SGlet for any non null value.

Specified by:
forAllNonNullValues in interface PropertySG
Parameters:
p1 - The element on which the value is being set or null for "this".
Throws:
org.xml.sax.SAXException

forAllValues

public void forAllValues(JavaMethod p0,
                         DirectAccessible p1,
                         SGlet p2)
                  throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Invokes the given SGlet for any value.

Specified by:
forAllValues in interface PropertySG
Parameters:
p1 - The element on which the value is being set or null for "this".
Throws:
org.xml.sax.SAXException

addValue

public void addValue(JavaMethod p0,
                     DirectAccessible p1,
                     java.lang.Object p2,
                     JavaQName p3)
              throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Creates a piece of Java code adding an element value. In the case of an element with multiplicity > 1, the object must be the atomic value.

Specified by:
addValue in interface PropertySG
Parameters:
p1 - The element on which the value is being set or null for "this".
p3 - The values type, if a cast is required, or null, if the value is already casted.
Throws:
org.xml.sax.SAXException

setValue

public void setValue(JavaMethod p0,
                     DirectAccessible p1,
                     java.lang.Object p2,
                     JavaQName p3)
              throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Creates a piece of Java code setting the elements property value. In the case of an element with multiplicity > 1, the object must be a list or an array.

Specified by:
setValue in interface PropertySG
Parameters:
p0 - The method being generated.
p1 - The element on which the value is being set or null for "this".
p3 - The values type, if a cast is required, or null, if the value is already casted.
Throws:
org.xml.sax.SAXException

getValue

public java.lang.Object getValue(DirectAccessible p0)
                          throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Returns a piece of Java code with the property value.

Specified by:
getValue in interface PropertySG
Parameters:
p0 - The element on which the value is being set or null for "this".
Throws:
org.xml.sax.SAXException

getXMLIsSetMethod

public JavaMethod getXMLIsSetMethod(JavaSource p0)
                             throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Creates the isSet returning whether the property value is set or not.

Specified by:
getXMLIsSetMethod in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLSetMethod

public JavaMethod getXMLSetMethod(JavaSource p0)
                           throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Creates the setter returning the property value.

Specified by:
getXMLSetMethod in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLGetMethod

public JavaMethod getXMLGetMethod(JavaSource p0)
                           throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Creates the getter returning the property value.

Specified by:
getXMLGetMethod in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLField

public JavaField getXMLField(JavaSource p0)
                      throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Creates the Java field holding the objects property value.

Specified by:
getXMLField in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLIsSetMethodName

public java.lang.String getXMLIsSetMethodName()
                                       throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Returns the name of the objects "isSet" method.

Specified by:
getXMLIsSetMethodName in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLSetMethodName

public java.lang.String getXMLSetMethodName()
                                     throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Returns the objects setter name.

Specified by:
getXMLSetMethodName in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLGetMethodName

public java.lang.String getXMLGetMethodName()
                                     throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Returns the objects getter name.

Specified by:
getXMLGetMethodName in interface PropertySG
Throws:
org.xml.sax.SAXException

getXMLFieldName

public java.lang.String getXMLFieldName()
                                 throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Returns the objects property name.

Specified by:
getXMLFieldName in interface PropertySG
Throws:
org.xml.sax.SAXException

getCollectionType

public java.lang.String getCollectionType()
Description copied from interface: PropertySG

Returns the properties collection type.

Specified by:
getCollectionType in interface PropertySG

hasIsSetMethod

public boolean hasIsSetMethod()
Description copied from interface: PropertySG

Returns whether the property has an "is set" method.

Specified by:
hasIsSetMethod in interface PropertySG

init

public void init()
          throws org.xml.sax.SAXException
Description copied from interface: PropertySG

Initializes the PropertySG.

Specified by:
init in interface PropertySG
Throws:
org.xml.sax.SAXException

getHeadOfChain

public PropertySGChain getHeadOfChain()