public interface MethodSource<O extends JavaSource<O>> extends Method<O,MethodSource<O>>, AbstractableSource<MethodSource<O>>, MemberSource<O,MethodSource<O>>, GenericCapableSource<O,MethodSource<O>>
| Modifier and Type | Method and Description |
|---|---|
ParameterSource<O> |
addParameter(Class<?> type,
String name)
Add a parameter with the specified
Class type and name to this method |
ParameterSource<O> |
addParameter(JavaType<?> type,
String name)
Add a parameter with the specified
JavaType type and name to this method |
ParameterSource<O> |
addParameter(String type,
String name)
Add a parameter with the specified type and name to this method
|
MethodSource<O> |
addThrows(Class<? extends Exception> type)
Add a thrown
Exception to this method's signature. |
MethodSource<O> |
addThrows(String type)
Add a thrown
Exception to this method's signature. |
List<ParameterSource<O>> |
getParameters()
Get a list of this
Method's parameters. |
MethodSource<O> |
removeParameter(Class<?> type,
String name)
Remove a parameter with the specified
Class type and name from this method |
MethodSource<O> |
removeParameter(JavaType<?> type,
String name)
Remove a parameter with the specified
JavaType type and name to this method |
MethodSource<O> |
removeParameter(ParameterSource<O> parameter)
Remove a parameter from this method
|
MethodSource<O> |
removeParameter(String type,
String name)
Remove a parameter with the specified type and name from this method
|
MethodSource<O> |
removeThrows(Class<? extends Exception> type)
Remove a thrown
Exception to this method's signature. |
MethodSource<O> |
removeThrows(String type)
Remove a thrown
Exception to this method's signature. |
MethodSource<O> |
setBody(String body)
Set the inner body of this
Method |
MethodSource<O> |
setConstructor(boolean constructor)
Toggle this method as a constructor.
|
MethodSource<O> |
setDefault(boolean value)
Sets the default keyword in this method
|
MethodSource<O> |
setNative(boolean value)
Sets this method to be native
IMPORTANT: Setting it to
true will remove the method body. |
MethodSource<O> |
setParameters(String string)
Set this
Method's parameters. |
MethodSource<O> |
setReturnType(Class<?> type)
Set this
Method to return the given type. |
MethodSource<O> |
setReturnType(JavaType<?> type)
|
MethodSource<O> |
setReturnType(String type)
Set this
Method to return the given type. |
MethodSource<O> |
setReturnTypeVoid()
Set this
Method to return 'void' |
MethodSource<O> |
setSynchronized(boolean value)
Sets the synchronized keyword in this element.
|
getBody, getReturnType, getThrownExceptions, isConstructor, isDefault, isNative, isReturnTypeVoid, isSynchronized, toSignaturesetAbstractisAbstractaddAnnotation, addAnnotation, addAnnotation, getAnnotation, getAnnotation, getAnnotations, removeAllAnnotations, removeAnnotationhasAnnotation, hasAnnotationgetInternalsetPackagePrivate, setPrivate, setProtected, setPublic, setVisibilitygetVisibility, isPackagePrivate, isPrivate, isProtected, isPublicsetNamegetJavaDoc, removeJavaDochasJavaDocsetFinalisFinalsetStaticisStaticgetColumnNumber, getEndPosition, getLineNumber, getStartPositionaddTypeVariable, addTypeVariable, getTypeVariable, getTypeVariables, removeTypeVariable, removeTypeVariableMethodSource<O> setDefault(boolean value)
value - if this method should have the default keywork setMethodSource<O> setSynchronized(boolean value)
value - if this element should be set to synchronizedMethodSource<O> setNative(boolean value)
true will remove the method body.MethodSource<O> setReturnType(Class<?> type)
Method to return the given type.MethodSource<O> setReturnType(String type)
Method to return the given type.MethodSource<O> setReturnType(JavaType<?> type)
MethodSource<O> setReturnTypeVoid()
Method to return 'void'MethodSource<O> setBody(String body)
MethodMethodSource<O> setConstructor(boolean constructor)
MethodSource<O> setParameters(String string)
Method's parameters.MethodSource<O> addThrows(String type)
Exception to this method's signature.MethodSource<O> addThrows(Class<? extends Exception> type)
Exception to this method's signature.MethodSource<O> removeThrows(String type)
Exception to this method's signature.MethodSource<O> removeThrows(Class<? extends Exception> type)
Exception to this method's signature.List<ParameterSource<O>> getParameters()
Method's parameters.getParameters in interface Method<O extends JavaSource<O>,MethodSource<O extends JavaSource<O>>>ParameterSource<O> addParameter(Class<?> type, String name)
Class type and name to this methodParameterSource<O> addParameter(String type, String name)
ParameterSource<O> addParameter(JavaType<?> type, String name)
JavaType type and name to this methodMethodSource<O> removeParameter(ParameterSource<O> parameter)
MethodSource<O> removeParameter(Class<?> type, String name)
Class type and name from this methodMethodSource<O> removeParameter(String type, String name)
MethodSource<O> removeParameter(JavaType<?> type, String name)
JavaType type and name to this methodCopyright © 2016 JBoss by Red Hat. All rights reserved.