Package org.jboss.forge.roaster.model
Interface MethodHolder<O extends JavaType<O>>
-
- All Superinterfaces:
MemberHolder<O>
- All Known Subinterfaces:
EnumConstant.ReadBody<O>,EnumConstantSource.Body,JavaClass<O>,JavaClassSource,JavaEnum<O>,JavaEnumSource,JavaInterface<O>,JavaInterfaceSource,MethodHolderSource<O>,PropertyHolder<O>,PropertyHolderSource<O>
public interface MethodHolder<O extends JavaType<O>> extends MemberHolder<O>
Represents aJavaTypethat may declare methods.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Method<O,?>getMethod(java.lang.String name)Return theMethodwith the given name and zero parameters; otherwise return null.Method<O,?>getMethod(java.lang.String name, java.lang.Class<?>... paramTypes)Return theMethodwith the given name and signature types; otherwise return null.Method<O,?>getMethod(java.lang.String name, java.lang.String... paramTypes)Return theMethodwith the given name and signature types; otherwise return null.java.util.List<? extends Method<O,?>>getMethods()Get aListof allMethods declared by thisMethodHolderinstance, if any; otherwise, return an emptyListbooleanhasMethod(Method<O,?> name)Return true if thisMethodHolderhas a method with the given name and zero parameters; otherwise return false.booleanhasMethodSignature(java.lang.String name)Return true if thisMethodHolderhas a method with the given name and zero parameters; otherwise return false.booleanhasMethodSignature(java.lang.String name, java.lang.Class<?>... paramTypes)Return true if thisMethodHolderhas a method with the given name and signature types; otherwise return false.booleanhasMethodSignature(java.lang.String name, java.lang.String... paramTypes)Return true if thisMethodHolderhas a method with the given name and signature types; otherwise return false.booleanhasMethodSignature(Method<?,?> method)Return true if thisMethodHolderhas a method with signature matching the given method's signature.-
Methods inherited from interface org.jboss.forge.roaster.model.MemberHolder
getMembers
-
-
-
-
Method Detail
-
hasMethod
boolean hasMethod(Method<O,?> name)
Return true if thisMethodHolderhas a method with the given name and zero parameters; otherwise return false.
-
hasMethodSignature
boolean hasMethodSignature(Method<?,?> method)
Return true if thisMethodHolderhas a method with signature matching the given method's signature.
-
hasMethodSignature
boolean hasMethodSignature(java.lang.String name)
Return true if thisMethodHolderhas a method with the given name and zero parameters; otherwise return false.
-
hasMethodSignature
boolean hasMethodSignature(java.lang.String name, java.lang.String... paramTypes)Return true if thisMethodHolderhas a method with the given name and signature types; otherwise return false.
-
hasMethodSignature
boolean hasMethodSignature(java.lang.String name, java.lang.Class<?>... paramTypes)Return true if thisMethodHolderhas a method with the given name and signature types; otherwise return false.
-
getMethod
Method<O,?> getMethod(java.lang.String name)
Return theMethodwith the given name and zero parameters; otherwise return null.
-
getMethod
Method<O,?> getMethod(java.lang.String name, java.lang.String... paramTypes)
Return theMethodwith the given name and signature types; otherwise return null.
-
getMethod
Method<O,?> getMethod(java.lang.String name, java.lang.Class<?>... paramTypes)
Return theMethodwith the given name and signature types; otherwise return null.
-
getMethods
java.util.List<? extends Method<O,?>> getMethods()
Get aListof allMethods declared by thisMethodHolderinstance, if any; otherwise, return an emptyList
-
-