|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MethodHolder<T>
| Method Summary | |
|---|---|
Method<T> |
addMethod()
Add an uninitialized Method declaration to this T instance. |
Method<T> |
addMethod(String method)
Add a new Method declaration to this T instance, using the given String as the method
declaration. |
Method<T> |
getMethod(String name)
Return the Method with the given name and zero parameters; otherwise return null. |
Method<T> |
getMethod(String name,
Class<?>... paramTypes)
Return the Method with the given name and signature types; otherwise return null. |
Method<T> |
getMethod(String name,
String... paramTypes)
Return the Method with the given name and signature types; otherwise return null. |
List<Method<T>> |
getMethods()
Get a List of all Methods declared by this T instance, if any; otherwise, return an empty
List |
boolean |
hasMethod(Method<T> name)
Return true if this T has a method with the given name and zero parameters; otherwise return false. |
boolean |
hasMethodSignature(Method<?> method)
Return true if this T has a method with signature matching the given method's signature. |
boolean |
hasMethodSignature(String name)
Return true if this T has a method with the given name and zero parameters; otherwise return false. |
boolean |
hasMethodSignature(String name,
Class<?>... paramTypes)
Return true if this T has a method with the given name and signature types; otherwise return false. |
boolean |
hasMethodSignature(String name,
String... paramTypes)
Return true if this T has a method with the given name and signature types; otherwise return false. |
T |
removeMethod(Method<T> method)
Remove the given Method declaration from this T instance, if it exists; otherwise, do nothing. |
| Methods inherited from interface org.jboss.forge.parser.java.MemberHolder |
|---|
getMembers |
| Method Detail |
|---|
Method<T> addMethod()
Method declaration to this T instance. This Method will be a stub
until further modified.
Method<T> addMethod(String method)
Method declaration to this T instance, using the given String as the method
declaration.
For example:Method m = javaClass.addMethod("public String method() {return \"hello!\";}")
boolean hasMethod(Method<T> name)
T has a method with the given name and zero parameters; otherwise return false.
boolean hasMethodSignature(Method<?> method)
T has a method with signature matching the given method's signature.
boolean hasMethodSignature(String name)
T has a method with the given name and zero parameters; otherwise return false.
boolean hasMethodSignature(String name,
String... paramTypes)
T has a method with the given name and signature types; otherwise return false.
boolean hasMethodSignature(String name,
Class<?>... paramTypes)
T has a method with the given name and signature types; otherwise return false.
Method<T> getMethod(String name)
Method with the given name and zero parameters; otherwise return null.
Method<T> getMethod(String name,
String... paramTypes)
Method with the given name and signature types; otherwise return null.
Method<T> getMethod(String name,
Class<?>... paramTypes)
Method with the given name and signature types; otherwise return null.
List<Method<T>> getMethods()
List of all Methods declared by this T instance, if any; otherwise, return an empty
List
T removeMethod(Method<T> method)
Method declaration from this T instance, if it exists; otherwise, do nothing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||