This class hides those details and allow callers to declare methods just once.
| Modifier and Type | Field and Description |
|---|---|
| protected final JCodeModel |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract JVar | Returns: JVar object that represents a newly added parameter on the implementation class.Adds a parameter to the previously declared method. |
| public final JVar | |
| public abstract JMethod | Returns: JMethod object that represents a newly declared method on the implementation class.Declares a method in both the interface and the implementation. |
| public final JMethod | |
| public abstract JDocComment | javadoc()
To generate javadoc for the previously declared method, use this method
to obtain a |
| codeModel | back to summary |
|---|---|
| protected final JCodeModel codeModel | |
| MethodWriter | back to summary |
|---|---|
| protected MethodWriter(ClassOutline context) | |
| addParameter | back to summary |
|---|---|
| public abstract JVar addParameter(JType type, String name) Adds a parameter to the previously declared method.
| |
| addParameter | back to summary |
|---|---|
| public final JVar addParameter(Class<?> type, String name) | |
| declareMethod | back to summary |
|---|---|
| public abstract JMethod declareMethod(JType returnType, String methodName) Declares a method in both the interface and the implementation.
| |
| declareMethod | back to summary |
|---|---|
| public final JMethod declareMethod(Class<?> returnType, String methodName) | |
| javadoc | back to summary |
|---|---|
| public abstract JDocComment javadoc() To generate javadoc for the previously declared method, use this method
to obtain a | |