|
||||||||||
| 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,
java.lang.String modifiers,
SgClass returnType,
java.lang.String name)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addBodyLine(java.lang.String line)
Add a new line to the body. |
java.util.List<java.lang.String> |
getBody()
Returns the body of the method. |
java.lang.String |
getCallSignature()
Returns the "call" signature of the method. |
java.lang.String |
getName()
Returns the name of the method. |
java.lang.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. |
java.lang.String |
getSignature()
Returns the "signature" of the method. |
java.lang.String |
getTypeSignature()
Returns the "type" signature of the method. |
java.lang.String |
getUnderscoredNameAndTypes()
Returns the name of the method (first character upper case) and the argument types divided by by an underscore. |
java.lang.String |
toString()
|
java.lang.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,
java.lang.String modifiers,
SgClass returnType,
java.lang.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 java.util.List<java.lang.String> getBody()
public final void addBodyLine(java.lang.String line)
line - Line to add - Cannot be null (but empty).public final java.lang.String getName()
public final java.lang.String getNameAsPackage()
public final java.lang.String getSignature()
public final java.lang.String getCallSignature()
public final java.lang.String getTypeSignature()
public final java.lang.String getUnderscoredNameAndTypes()
public final java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.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 | |||||||||