public interface Method<O extends JavaSource<O>> extends Abstractable<Method<O>>, Member<O,Method<O>>, Origin<O>
| Modifier and Type | Method and Description |
|---|---|
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<O>> |
getParameters()
Get a list of this
Method's parameters. |
String |
getQualifiedReturnType()
Get the fully qualified return type of this
Method or return null if the return type is void. |
String |
getReturnType()
Get the return type of this
Method or return null if the return type is void. |
Type<O> |
getReturnTypeInspector()
|
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> |
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. |
isAbstract, setAbstractisFinal, isStatic, setFinal, setStaticgetVisibility, isPackagePrivate, isPrivate, isProtected, isPublic, setPackagePrivate, setPrivate, setProtected, setPublic, setVisibilityaddAnnotation, addAnnotation, addAnnotation, getAnnotation, getAnnotation, getAnnotations, hasAnnotation, hasAnnotation, removeAnnotationgetInternalboolean isConstructor()
Method is a constructor for the class in which it is defined.String getReturnType()
Method or return null if the return type is void.String getQualifiedReturnType()
Method or return null if the return type is void.Method<O> setReturnType(JavaSource<?> type)
Method to return the given JavaSource type.boolean isReturnTypeVoid()
Method has a return type of 'void'String toSignature()
Method into a string representing its unique 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.Copyright © 2013 JBoss by Red Hat. All Rights Reserved.