Package com.sun.tools.xjc.generator.bean
Class MethodWriter
java.lang.Object
com.sun.tools.xjc.generator.bean.MethodWriter
The back-end may or may not generate the content interface
separately from the implementation class. If so, a method
needs to be declared on both the interface and the implementation class.
This class hides those details and allow callers to declare methods just once.
- Author:
- Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract JVaraddParameter(JType type, String name) Adds a parameter to the previously declared method.final JVaraddParameter(Class type, String name) abstract JMethoddeclareMethod(JType returnType, String methodName) Declares a method in both the interface and the implementation.final JMethoddeclareMethod(Class returnType, String methodName) abstract JDocCommentjavadoc()To generate javadoc for the previously declared method, use this method to obtain aJDocCommentobject.
-
Field Details
-
codeModel
-
-
Constructor Details
-
MethodWriter
-
-
Method Details
-
declareMethod
Declares a method in both the interface and the implementation.- Returns:
- JMethod object that represents a newly declared method on the implementation class.
-
declareMethod
-
javadoc
To generate javadoc for the previously declared method, use this method to obtain aJDocCommentobject. This may return a value different from declareMethod().javadoc(). -
addParameter
Adds a parameter to the previously declared method.- Returns:
- JVar object that represents a newly added parameter on the implementation class.
-
addParameter
-