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, JavaRecord<O>, JavaRecordSource, MethodHolderSource<O>, PropertyHolder<O>, PropertyHolderSource<O>

public interface MethodHolder<O extends JavaType<O>> extends MemberHolder<O>
Represents a JavaType that may declare methods.
Author:
Lincoln Baxter, III
  • Method Details

    • hasMethod

      default boolean hasMethod(Method<O,?> name)
      Return true if this MethodHolder has a method with the given name and zero parameters; otherwise return false.
    • hasMethodSignature

      default boolean hasMethodSignature(Method<?,?> method)
      Return true if this MethodHolder has a method with signature matching the given method's signature.
    • hasMethodSignature

      default boolean hasMethodSignature(String name)
      Return true if this MethodHolder has a method with the given name and zero parameters; otherwise return false.
    • hasMethodSignature

      default boolean hasMethodSignature(String name, String... paramTypes)
      Return true if this MethodHolder has a method with the given name and signature types; otherwise return false.
    • hasMethodSignature

      default boolean hasMethodSignature(String name, Class<?>... paramTypes)
      Return true if this MethodHolder has a method with the given name and signature types; otherwise return false.
    • getMethod

      default Method<O,?> getMethod(String name)
      Return the Method with the given name and zero parameters; otherwise return null.
    • getMethod

      Method<O,?> getMethod(String name, String... paramTypes)
      Return the Method with the given name and signature types; otherwise return null.
    • getMethod

      Method<O,?> getMethod(String name, Class<?>... paramTypes)
      Return the Method with the given name and signature types; otherwise return null.
    • getMethods

      List<? extends Method<O,?>> getMethods()
      Get a List of all Methods declared by this MethodHolder instance, if any; otherwise, return an empty List