Package iu.type

Class MethodFacade<D,R>

Type Parameters:
D - declaring type
R - method return type
All Implemented Interfaces:
IuAnnotatedElement, IuDeclaredElement<D>, IuExecutable<D,R>, IuMethod<D,R>, IuNamedElement<D>, IuParameterizedElement, ParameterizedFacade

final class MethodFacade<D,R> extends ExecutableBase<D,R,Method> implements IuMethod<D,R>
Facade implementation for IuMethod.
  • Constructor Details

  • Method Details

    • name

      public String name()
      Description copied from interface: IuNamedElement
      Gets the name.
      Specified by:
      name in interface IuNamedElement<D>
      Returns:
      name
    • isStatic

      public boolean isStatic()
      Description copied from interface: IuMethod
      Determines if this is a static method.
      Specified by:
      isStatic in interface IuMethod<D,R>
      Returns:
      true if static; else false
    • returnType

      public TypeFacade<?,R> returnType()
      Description copied from interface: IuMethod
      Gets the return type.
      Specified by:
      returnType in interface IuMethod<D,R>
      Returns:
      return type
    • exec

      public R exec(Object... arguments) throws Exception
      Description copied from interface: IuMethod
      Executes a method.
      Specified by:
      exec in interface IuExecutable<D,R>
      Specified by:
      exec in interface IuMethod<D,R>
      Parameters:
      arguments - argument values; when IuMethod.isStatic() returns false, the first argument must be the instance to invoke the method on.
      Returns:
      return value
      Throws:
      Exception - If an exception occurs