|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Method<O>
Represents a Java Method.
| Method Summary | |
|---|---|
Method<O> |
addThrows(Class<? extends Exception> type)
Add a thrown Exception to this method's signature. |
Method<O> |
addThrows(String type)
Add a thrown Exception to this method's signature. |
String |
getBody()
Get the inner body of this Method |
List<Parameter> |
getParameters()
Get a list of this Method's parameters. |
String |
getReturnType()
Get the return type of this Method or return null if the return type is void. |
List<String> |
getThrownExceptions()
Get a list of qualified (if possible) Exception class names thrown by this method. |
boolean |
isConstructor()
Return true if this Method is a constructor for the class in which it is defined. |
boolean |
isReturnTypeVoid()
Return true if this Method has a return type of 'void' |
Method<O> |
removeThrows(Class<? extends Exception> type)
Remove a thrown Exception to this method's signature. |
Method<O> |
removeThrows(String type)
Remove a thrown Exception to this method's signature. |
Method<O> |
setBody(String body)
Set the inner body of this Method |
Method<O> |
setConstructor(boolean constructor)
Toggle this method as a constructor. |
Method<O> |
setName(String name)
Set the name of this Method |
Method<O> |
setParameters(String string)
Set this Method's parameters. |
Method<O> |
setReturnType(Class<?> type)
Set this Method to return the given type. |
Method<O> |
setReturnType(JavaSource<?> type)
Set this Method to return the given JavaSource type. |
Method<O> |
setReturnType(String type)
Set this Method to return the given type. |
Method<O> |
setReturnTypeVoid()
Set this Method to return 'void' |
String |
toSignature()
Convert this Method into a string representing its unique signature. |
| Methods inherited from interface org.jboss.forge.parser.java.Abstractable |
|---|
isAbstract, setAbstract |
| Methods inherited from interface org.jboss.forge.parser.java.Member |
|---|
getName, isFinal, isStatic, setFinal, setStatic |
| Methods inherited from interface org.jboss.forge.parser.java.VisibilityScoped |
|---|
getVisibility, isPackagePrivate, isPrivate, isProtected, isPublic, setPackagePrivate, setPrivate, setProtected, setPublic, setVisibility |
| Methods inherited from interface org.jboss.forge.parser.java.AnnotationTarget |
|---|
addAnnotation, addAnnotation, addAnnotation, getAnnotation, getAnnotation, getAnnotations, hasAnnotation, hasAnnotation, removeAnnotation |
| Methods inherited from interface org.jboss.forge.parser.Internal |
|---|
getInternal |
| Methods inherited from interface org.jboss.forge.parser.Origin |
|---|
getOrigin |
| Method Detail |
|---|
String getBody()
Method
Method<O> setBody(String body)
Method
Method<O> setConstructor(boolean constructor)
Method is not the same as the name of
its parent JavaClass , update the name of the to match.
boolean isConstructor()
Method is a constructor for the class in which it is defined.
Method<O> setName(String name)
Method
String getReturnType()
Method or return null if the return type is void.
Method<O> setReturnType(Class<?> type)
Method to return the given type.
Method<O> setReturnType(String type)
Method to return the given type.
Method<O> setReturnType(JavaSource<?> type)
Method to return the given JavaSource type.
boolean isReturnTypeVoid()
Method has a return type of 'void'
Method<O> setReturnTypeVoid()
Method to return 'void'
Method<O> setParameters(String string)
Method's parameters.
List<Parameter> getParameters()
Method's parameters.
String toSignature()
Method into a string representing its unique signature.
Method<O> addThrows(String type)
Exception to this method's signature.
Method<O> addThrows(Class<? extends Exception> type)
Exception to this method's signature.
List<String> getThrownExceptions()
Exception class names thrown by this method.
Method<O> removeThrows(String type)
Exception to this method's signature.
Method<O> removeThrows(Class<? extends Exception> type)
Exception to this method's signature.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||