org.mindswap.ocl
Interface OCLMethodChain

All Known Implementing Classes:
OCLMethodChainImpl

public interface OCLMethodChain

Title: OCLMethodChain

Description: Represents a continous string of method calls. Equivalent to the java expression someInstance.aMethod().anotherMethod().foo()

Copyright: Copyright (c) 2005

Company: Mindswap (http://www.mindswap.org)


Method Summary
 void addMethod(OCLMethod theMethod)
          Adds the specified method to the method chain
 java.lang.Object invoke()
          Invokes this method chain and returns its result
 void removeMethod(OCLMethod theMethod)
          Removes the specified method from the chain
 

Method Detail

addMethod

public void addMethod(OCLMethod theMethod)
Adds the specified method to the method chain

Parameters:
theMethod - OCLMethod

removeMethod

public void removeMethod(OCLMethod theMethod)
Removes the specified method from the chain

Parameters:
theMethod - OCLMethod

invoke

public java.lang.Object invoke()
                        throws java.lang.IllegalArgumentException,
                               java.lang.NoSuchMethodException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
Invokes this method chain and returns its result

Returns:
Object the value returned by the method, or null if no value returned
Throws:
java.lang.IllegalArgumentException - if there is no object to invoke this method on
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException