org.mindswap.ocl.impl
Class OCLMethodChainImpl

java.lang.Object
  extended byResourceImpl
      extended byorg.mindswap.ocl.impl.OCLResourceImpl
          extended byorg.mindswap.ocl.impl.OCLMethodChainImpl
All Implemented Interfaces:
OCLMethodChain

public class OCLMethodChainImpl
extends OCLResourceImpl
implements OCLMethodChain

Title:

Description: Implementation of the OCL Method Chain interface

Copyright: Copyright (c) 2005

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

See Also:
Serialized Form

Field Summary
static Implementation factory
           
 
Constructor Summary
OCLMethodChainImpl(Node n, EnhGraph eg)
           
 
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
 
Methods inherited from class org.mindswap.ocl.impl.OCLResourceImpl
mustBeValidModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static Implementation factory
Constructor Detail

OCLMethodChainImpl

public OCLMethodChainImpl(Node n,
                          EnhGraph eg)
Method Detail

addMethod

public void addMethod(OCLMethod theMethod)
Description copied from interface: OCLMethodChain
Adds the specified method to the method chain

Specified by:
addMethod in interface OCLMethodChain
Parameters:
theMethod - OCLMethod

removeMethod

public void removeMethod(OCLMethod theMethod)
Description copied from interface: OCLMethodChain
Removes the specified method from the chain

Specified by:
removeMethod in interface OCLMethodChain
Parameters:
theMethod - OCLMethod

invoke

public java.lang.Object invoke()
                        throws java.lang.IllegalArgumentException,
                               java.lang.NoSuchMethodException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
Description copied from interface: OCLMethodChain
Invokes this method chain and returns its result

Specified by:
invoke in interface OCLMethodChain
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