|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.srcgen4javassist.SgBehavior
org.fuin.srcgen4javassist.SgMethod
public final class SgMethod
A method.
| Constructor Summary | |
|---|---|
SgMethod(SgClass owner,
String modifiers,
SgClass returnType,
String name)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addBodyLine(String line)
Add a new line to the body. |
List<String> |
getBody()
Returns the body of the method. |
String |
getCallSignature()
Returns the "call" signature of the method. |
String |
getName()
Returns the name of the method. |
String |
getNameAsPackage()
Returns the name of the method with an "underscore" inserted before all upper case characters and all characters converted to lower case. |
SgClass |
getReturnType()
Return the return type of the method. |
String |
getSignature()
Returns the "signature" of the method. |
String |
getTypeSignature()
Returns the "type" signature of the method. |
String |
getUnderscoredNameAndTypes()
Returns the name of the method (first character upper case) and the argument types divided by by an underscore. |
String |
toString()
|
String |
toString(boolean showAnnotations)
Creates the method's source with or without annotations. |
| Methods inherited from class org.fuin.srcgen4javassist.SgBehavior |
|---|
addAnnotation, addAnnotations, addArgument, addException, getAnnotations, getArguments, getArguments, getCommaSeparatedArgumentNames, getCommaSeparatedArgumentNames, getExceptions, getLastArgument, getModifiers, getOwner, hasAnnotation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SgMethod(SgClass owner,
String modifiers,
SgClass returnType,
String name)
owner.
owner - Class the behavior belongs to - Cannot be null.modifiers - Modifiers for the constructor/method - Cannot be null (but
empty).returnType - Return type of the method - Cannot be null (Use VOID in model
class for no return value).name - Name of the method.| Method Detail |
|---|
public final SgClass getReturnType()
public final List<String> getBody()
public final void addBodyLine(String line)
line - Line to add - Cannot be null (but empty).public final String getName()
public final String getNameAsPackage()
public final String getSignature()
public final String getCallSignature()
public final String getTypeSignature()
public final String getUnderscoredNameAndTypes()
public final String toString()
toString in class Objectpublic final String toString(boolean showAnnotations)
showAnnotations - To include annotations true else
true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||