org.scijava.module
Class MethodRef

java.lang.Object
  extended by org.scijava.module.MethodRef
All Implemented Interfaces:
Validated

public class MethodRef
extends Object
implements Validated

A reference to a Method, which can be invoked at will.

Author:
Curtis Rueden

Constructor Summary
MethodRef(Class<?> clazz, String methodName, Class<?>... params)
           
 
Method Summary
 void execute(Object obj, Object... args)
           
 List<ValidityProblem> getProblems()
          Gets the list of problems encountered while initializing the object.
 boolean isValid()
          Gets whether the object is completely valid (i.e., no problems during initialization).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodRef

public MethodRef(Class<?> clazz,
                 String methodName,
                 Class<?>... params)
Method Detail

execute

public void execute(Object obj,
                    Object... args)
             throws MethodCallException
Throws:
MethodCallException

isValid

public boolean isValid()
Description copied from interface: Validated
Gets whether the object is completely valid (i.e., no problems during initialization).

Specified by:
isValid in interface Validated

getProblems

public List<ValidityProblem> getProblems()
Description copied from interface: Validated
Gets the list of problems encountered while initializing the object.

Specified by:
getProblems in interface Validated
Returns:
The list of problems, or a zero-length list in the case of Validated.isValid() returning true.


Copyright © 2009–2014 SciJava. All rights reserved.