站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 jaxrpc API Documentation 英文版文档

JavaBeanWriter (JAXRPC API) - JBoss 3.2.7 jaxrpc API Documentation 英文版文档


org.apache.axis.wsdl.toJava
Class JavaBeanWriter

java.lang.Object
  extended byorg.apache.axis.wsdl.toJava.JavaWriter
      extended byorg.apache.axis.wsdl.toJava.JavaClassWriter
          extended byorg.apache.axis.wsdl.toJava.JavaBeanWriter
All Implemented Interfaces:
Generator
Direct Known Subclasses:
JavaBeanFaultWriter

public class JavaBeanWriter
extends JavaClassWriter

This is Wsdl2java's Complex Type Writer. It writes the .java file.


Field Summary
protected  boolean enableDefaultConstructor
           
protected  boolean enableEquals
           
protected  boolean enableFullConstructor
           
protected  boolean enableGetters
           
protected  boolean enableHashCode
           
protected  boolean enableSetters
           
protected  boolean enableSimpleConstructors
           
protected  boolean enableToString
           
protected  JavaBeanHelperWriter helper
           
protected  Vector names
           
protected  PrintWriter pw
           
protected  String simpleValueType
           
 
Fields inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter
className, namespaces, packageName
 
Fields inherited from class org.apache.axis.wsdl.toJava.JavaWriter
emitter
 
Constructor Summary
protected JavaBeanWriter(Emitter emitter, TypeEntry type, Vector elements, TypeEntry extendType, Vector attributes, JavaWriter helper)
          Constructor.
 
Method Summary
protected  String getClassModifiers()
          Returns the appropriate extends text
protected  String getExtendsText()
          Returns the appropriate extends text
protected  String getImplementsText()
          Returns the appropriate implements text
protected  void preprocess()
          Builds the names String vector.
protected  void writeAccessMethods()
          Writes the setter and getter methods
protected  void writeDefaultConstructor()
          Writes the default constructor.
protected  void writeEqualsMethod()
          Writes a general purpose equals method
protected  void writeFileBody(PrintWriter pw)
          Generate the binding for the given complex type.
protected  void writeFullConstructor()
          Writes the full constructor.
protected  void writeHashCodeMethod()
          Writes a general purpose hashCode method.
protected  void writeMemberFields()
          Writes the member fields.
protected  void writeSimpleConstructors()
          Writes the constructors for SimpleTypes.
protected  void writeToStringMethod()
          Writes the toString method Currently the toString method is only written for simpleTypes.
 
Methods inherited from class org.apache.axis.wsdl.toJava.JavaClassWriter
getClassName, getClassText, getFileName, getPackage, registerFile, writeFileFooter, writeFileHeader, writeHeaderComments, writePackage
 
Methods inherited from class org.apache.axis.wsdl.toJava.JavaWriter
closePrintWriter, generate, getPrintWriter, isFileGenerated, verboseMessage, writeComment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helper

protected JavaBeanHelperWriter helper

names

protected Vector names

simpleValueType

protected String simpleValueType

pw

protected PrintWriter pw

enableDefaultConstructor

protected boolean enableDefaultConstructor

enableFullConstructor

protected boolean enableFullConstructor

enableSimpleConstructors

protected boolean enableSimpleConstructors

enableToString

protected boolean enableToString

enableSetters

protected boolean enableSetters

enableGetters

protected boolean enableGetters

enableEquals

protected boolean enableEquals

enableHashCode

protected boolean enableHashCode
Constructor Detail

JavaBeanWriter

protected JavaBeanWriter(Emitter emitter,
                         TypeEntry type,
                         Vector elements,
                         TypeEntry extendType,
                         Vector attributes,
                         JavaWriter helper)
Constructor.

Parameters:
emitter -
type - The type representing this class
elements - Vector containing the Type and name of each property
extendType - The type representing the extended class (or null)
attributes - Vector containing the attribute types and names
helper - Helper class writer
Method Detail

writeFileBody

protected void writeFileBody(PrintWriter pw)
                      throws IOException
Generate the binding for the given complex type.

Specified by:
writeFileBody in class JavaWriter
Throws:
IOException

preprocess

protected void preprocess()
Builds the names String vector. The even indices are the java class names of the member fields. The odd indices are the member variable names. Also sets the simpleValueType variable to the java class name of the simple value if this bean represents a simple type


getClassModifiers

protected String getClassModifiers()
Returns the appropriate extends text

Overrides:
getClassModifiers in class JavaClassWriter
Returns:
"" or "abstract "

getExtendsText

protected String getExtendsText()
Returns the appropriate extends text

Overrides:
getExtendsText in class JavaClassWriter
Returns:
"" or " extends "

getImplementsText

protected String getImplementsText()
Returns the appropriate implements text

Overrides:
getImplementsText in class JavaClassWriter
Returns:
" implements "

writeMemberFields

protected void writeMemberFields()
Writes the member fields.


writeDefaultConstructor

protected void writeDefaultConstructor()
Writes the default constructor.


writeFullConstructor

protected void writeFullConstructor()
Writes the full constructor. Note that this class is not recommended for JSR 101 compliant beans, but is provided for extended classes which may wish to generate a full constructor.


writeSimpleConstructors

protected void writeSimpleConstructors()
Writes the constructors for SimpleTypes. Writes a constructor accepting a string and a constructor accepting the simple java type.


writeToStringMethod

protected void writeToStringMethod()
Writes the toString method Currently the toString method is only written for simpleTypes.


writeAccessMethods

protected void writeAccessMethods()
Writes the setter and getter methods


writeEqualsMethod

protected void writeEqualsMethod()
Writes a general purpose equals method


writeHashCodeMethod

protected void writeHashCodeMethod()
Writes a general purpose hashCode method.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.