de.uni_paderborn.fujaba.codegen.digester.rules
Class XSetNextRule

java.lang.Object
  extended byde.uni_paderborn.fujaba.codegen.digester.XRule
      extended byde.uni_paderborn.fujaba.codegen.digester.rules.XSetNextRule

public class XSetNextRule
extends XRule

Rule implementation that calls a method on the (top-1) (parent) object, passing the top object (child) as an argument. It is commonly used to establish parent-child relationships.

Version:
$Revision: 1.9 $ $Date: 2004/10/29 13:46:53 $
Author:
Craig McClanahan

Field Summary
protected  java.lang.String methodName
          The method name to call on the parent object.
protected  java.lang.String paramType
          The Java class name of the parameter type expected by the method.
 
Fields inherited from class de.uni_paderborn.fujaba.codegen.digester.XRule
digester
 
Constructor Summary
XSetNextRule(XDigester digester, java.lang.String methodName)
          Construct a "set next" rule with the specified method name.
XSetNextRule(XDigester digester, java.lang.String methodName, java.lang.String paramType)
          Construct a "set next" rule with the specified method name.
 
Method Summary
 void end()
          Process the end of this element.
 void finish()
          Clean up after parsing is complete.
 
Methods inherited from class de.uni_paderborn.fujaba.codegen.digester.XRule
begin, body
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodName

protected java.lang.String methodName
The method name to call on the parent object.


paramType

protected java.lang.String paramType
The Java class name of the parameter type expected by the method.

Constructor Detail

XSetNextRule

public XSetNextRule(XDigester digester,
                    java.lang.String methodName)
Construct a "set next" rule with the specified method name. The method's argument type is assumed to be the class of the child object.

Parameters:
digester - The associated Digester
methodName - Method name of the parent method to call

XSetNextRule

public XSetNextRule(XDigester digester,
                    java.lang.String methodName,
                    java.lang.String paramType)
Construct a "set next" rule with the specified method name.

Parameters:
digester - The associated Digester
methodName - Method name of the parent method to call
paramType - Java class of the parent method's argument (if you wish to use a primitive type, specify the corresonding Java wrapper class instead, such as java.lang.Boolean for a boolean parameter)
Method Detail

end

public void end()
         throws java.lang.Exception
Process the end of this element.

Overrides:
end in class XRule
Throws:
java.lang.Exception - Exception description not provided

finish

public void finish()
            throws java.lang.Exception
Clean up after parsing is complete.

Overrides:
finish in class XRule
Throws:
java.lang.Exception - Exception description not provided