public class MethodBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VOID |
Constructor and Description |
---|
MethodBuilder(java.lang.String name) |
MethodBuilder(java.lang.String name,
java.lang.String returnType,
java.lang.String... arguments) |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(java.lang.String name) |
void |
addAnnotation(java.lang.String name,
java.lang.String arguments) |
void |
addAnnotationString(java.lang.String name,
java.lang.String argument) |
void |
addBodyComment(java.lang.String comment) |
void |
addBodyComment(java.lang.String comment,
int additionalIndents) |
void |
addBodyLine() |
void |
addBodyLine(java.lang.String line) |
void |
addBodyLine(java.lang.String line,
int additionalIndents) |
void |
addCustomLine(java.lang.String line) |
void |
addElseBlock() |
void |
addElseIfBlock(java.lang.String ifClause) |
void |
addMethodCommentLine(java.lang.String line) |
void |
addOneLineElse() |
void |
addOverride() |
void |
beginBodyBlock(java.lang.String line) |
void |
beginCatchBlock(java.lang.String exception) |
void |
beginFinallyBlock() |
void |
beginOneLineBlock(java.lang.String line) |
void |
beginTryBlock() |
void |
decrementIndent() |
void |
endBodyBlock() |
java.lang.String |
getModifier() |
java.lang.String |
getName() |
java.lang.String |
getReturnType() |
void |
incrementIndent() |
void |
setArguments(java.lang.String[] arguments) |
void |
setBody(java.lang.String body) |
void |
setFinal() |
void |
setName(java.lang.String name) |
void |
setPackageModifier() |
void |
setPrivateModifier() |
void |
setProtectedModifier() |
void |
setPublicModifier() |
void |
setReturnType(java.lang.String returnType) |
void |
setStatic() |
void |
setThrows(java.lang.String... throwsDeclarations) |
java.lang.String |
toString() |
public static final java.lang.String VOID
public MethodBuilder(java.lang.String name)
public MethodBuilder(java.lang.String name, java.lang.String returnType, java.lang.String... arguments)
public void setThrows(java.lang.String... throwsDeclarations)
public void setArguments(java.lang.String[] arguments)
public void setPrivateModifier()
public void setProtectedModifier()
public void setPublicModifier()
public void setPackageModifier()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getModifier()
public java.lang.String getReturnType()
public void setReturnType(java.lang.String returnType)
public void setBody(java.lang.String body)
public void addMethodCommentLine(java.lang.String line)
public void addBodyComment(java.lang.String comment)
public void addBodyComment(java.lang.String comment, int additionalIndents)
public void addBodyLine()
public void addCustomLine(java.lang.String line)
public void beginBodyBlock(java.lang.String line)
public void incrementIndent()
public void decrementIndent()
public void beginOneLineBlock(java.lang.String line)
public void addOneLineElse()
public void endBodyBlock()
public void addElseIfBlock(java.lang.String ifClause)
public void addElseBlock()
public void beginTryBlock()
public void beginCatchBlock(java.lang.String exception)
public void beginFinallyBlock()
public void addBodyLine(java.lang.String line, int additionalIndents)
public void addBodyLine(java.lang.String line)
public void addAnnotation(java.lang.String name)
public void addAnnotation(java.lang.String name, java.lang.String arguments)
public void addAnnotationString(java.lang.String name, java.lang.String argument)
public java.lang.String toString()
toString
in class java.lang.Object
public void addOverride()
public void setStatic()
public void setFinal()