public interface MethodHolderSource<O extends JavaSource<O>> extends MethodHolder<O>, MemberHolderSource<O>
JavaSource that may declare methods.| Modifier and Type | Method and Description |
|---|---|
MethodSource<O> |
addMethod()
Add an uninitialized
MethodSource declaration to this O instance. |
MethodSource<O> |
addMethod(String method)
Add a new
MethodSource declaration to this O instance, using the given String as the
method declaration. |
MethodSource<O> |
getMethod(String name)
Return the
MethodSource with the given name and zero parameters; otherwise return null. |
MethodSource<O> |
getMethod(String name,
Class<?>... paramTypes)
Return the
MethodSource with the given name and signature types; otherwise return null. |
MethodSource<O> |
getMethod(String name,
String... paramTypes)
Return the
MethodSource with the given name and signature types; otherwise return null. |
List<MethodSource<O>> |
getMethods()
Get a
List of all MethodSources declared by this O instance, if any; otherwise, return an
empty List |
O |
removeMethod(Method<O,?> method)
Remove the given
MethodSource declaration from this O instance, if it exists; otherwise, do
nothing. |
hasMethod, hasMethodSignature, hasMethodSignature, hasMethodSignature, hasMethodSignaturegetMembersMethodSource<O> getMethod(String name)
MethodSource with the given name and zero parameters; otherwise return null.getMethod in interface MethodHolder<O extends JavaSource<O>>MethodSource<O> getMethod(String name, String... paramTypes)
MethodSource with the given name and signature types; otherwise return null.getMethod in interface MethodHolder<O extends JavaSource<O>>MethodSource<O> getMethod(String name, Class<?>... paramTypes)
MethodSource with the given name and signature types; otherwise return null.getMethod in interface MethodHolder<O extends JavaSource<O>>List<MethodSource<O>> getMethods()
List of all MethodSources declared by this O instance, if any; otherwise, return an
empty ListgetMethods in interface MethodHolder<O extends JavaSource<O>>MethodSource<O> addMethod()
MethodSource declaration to this O instance. This MethodSource will be a stub
until further modified.MethodSource<O> addMethod(String method)
MethodSource declaration to this O instance, using the given String as the
method declaration.
For example:Method m = javaClass.addMethod("public String method() {return \"hello!\";}")O removeMethod(Method<O,?> method)
MethodSource declaration from this O instance, if it exists; otherwise, do
nothing.Copyright © 2014 JBoss by Red Hat. All rights reserved.