org.objectweb.jonas_ws.wsgen
Class GenerationContextImpl

java.lang.Object
  extended byorg.objectweb.jonas_ws.wsgen.GenerationContextImpl
All Implemented Interfaces:
GenerationContext

public class GenerationContextImpl
extends java.lang.Object
implements GenerationContext

The class GenerationContextImpl contains properties used along the Generation process.

Author:
Guillaume Sauthier

Field Summary
 
Fields inherited from interface org.objectweb.jonas_ws.wsgen.GenerationContext
CLASSPATH, FILENAME, GEN_DIR, JAVA_HOME
 
Constructor Summary
GenerationContextImpl()
          Construct a new GenerationContextImpl object.
 
Method Summary
 boolean containsProperty(java.lang.String name)
          Returns true if the GenerationContext contains a property with the specified name.
 java.lang.String getClasspath()
          Helper method returning the classpath.
 java.lang.String getFilename()
          Helper method returning the processed filename.
 java.lang.String getJavaHomeBin()
          Helper method returning the $JAVA_HOME/bin value.
 java.lang.Object getProperty(java.lang.String name)
          Get an property, return the property value or null if the property isn't set.
 java.lang.Object getProperty(java.lang.String name, java.lang.Object defolt)
          Get an property, return the property value or default if the property isn't set.
 java.util.Iterator getPropertyNames()
          Returns an Iterator view of the names of the properties in this GenerationContext
 void removeProperty(java.lang.String name)
          Removes a property (name-value pair) from the GenerationContext
 void setProperty(java.lang.String name, java.lang.Object value)
          Set a property for generation.
 java.lang.String toString()
          Return a String representation of a GenerationContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenerationContextImpl

public GenerationContextImpl()
Construct a new GenerationContextImpl object.

Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Set a property for generation.

Specified by:
setProperty in interface GenerationContext
Parameters:
name - property name
value - property value

getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    java.lang.Object defolt)
Get an property, return the property value or default if the property isn't set.

Specified by:
getProperty in interface GenerationContext
Parameters:
name - property name
defolt - default property value
Returns:
the property value or default value if the property isn't set.

getProperty

public java.lang.Object getProperty(java.lang.String name)
Get an property, return the property value or null if the property isn't set.

Specified by:
getProperty in interface GenerationContext
Parameters:
name - property name
Returns:
the property value or null if the property isn't set.

removeProperty

public void removeProperty(java.lang.String name)
Removes a property (name-value pair) from the GenerationContext

Specified by:
removeProperty in interface GenerationContext
Parameters:
name - Name of the property to be removed

containsProperty

public boolean containsProperty(java.lang.String name)
Returns true if the GenerationContext contains a property with the specified name.

Specified by:
containsProperty in interface GenerationContext
Parameters:
name - Name of the property whose presense is to be tested
Returns:
Returns true if the GenerationContext contains the property{ } otherwise false

getPropertyNames

public java.util.Iterator getPropertyNames()
Returns an Iterator view of the names of the properties in this GenerationContext

Specified by:
getPropertyNames in interface GenerationContext
Returns:
Iterator for the property names

getFilename

public java.lang.String getFilename()
Helper method returning the processed filename.

Specified by:
getFilename in interface GenerationContext
Returns:
the processed filename.

getClasspath

public java.lang.String getClasspath()
Helper method returning the classpath.

Specified by:
getClasspath in interface GenerationContext
Returns:
the classpath.

getJavaHomeBin

public java.lang.String getJavaHomeBin()
Helper method returning the $JAVA_HOME/bin value.

Specified by:
getJavaHomeBin in interface GenerationContext
Returns:
the $JAVA_HOME/bin value.

toString

public java.lang.String toString()
Return a String representation of a GenerationContext.

Returns:
a String representation of a GenerationContext.