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

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

public final class FUICallMethodRule
extends XRule

Struts-Digester Rule : extend default CallMethodRule
Rule implementation that calls a method on the top (parent) object, passing arguments collected from subsequent CallParamRule rules or from the body of this element.

Version:
$Revision: 1.6 $
Author:
$Author: schneider $

Field Summary
private  java.lang.String bodyText
          The body text collected from this element.
private static org.apache.log4j.Logger log
          log4j logging
private  java.lang.String methodName
          The method name to call on the parent object.
private  int paramCount
          The number of parameters to collect from MethodParam rules.
private  java.lang.Class[] paramTypes
          The parameter types of the parameters to be collected.
 
Fields inherited from class de.uni_paderborn.fujaba.codegen.digester.XRule
digester
 
Constructor Summary
FUICallMethodRule(XDigester digester, java.lang.String methodName, int paramCount)
          Construct a "call method" rule with the specified method name.
FUICallMethodRule(XDigester digester, java.lang.String methodName, int paramCount, java.lang.String[] paramTypes)
          Construct a "call method" rule with the specified method name.
 
Method Summary
 void begin(org.xml.sax.Attributes attributes)
          Process the start of this element.
 void body(java.lang.String bodyText)
          Process the body text of this element.
 void end()
          Process the end of this element.
 void finish()
          Clean up after parsing is complete.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final transient org.apache.log4j.Logger log
log4j logging


bodyText

private java.lang.String bodyText
The body text collected from this element.


methodName

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


paramCount

private int paramCount
The number of parameters to collect from MethodParam rules. If this value is zero, a single parameter will be collected from the body of this element.


paramTypes

private java.lang.Class[] paramTypes
The parameter types of the parameters to be collected.

Constructor Detail

FUICallMethodRule

public FUICallMethodRule(XDigester digester,
                         java.lang.String methodName,
                         int paramCount)
Construct a "call method" rule with the specified method name. The parameter types (if any) default to java.lang.String.

Parameters:
digester - The associated Digester
methodName - Method name of the parent method to call
paramCount - The number of parameters to collect, or zero for a single argument from the body of this element.

FUICallMethodRule

public FUICallMethodRule(XDigester digester,
                         java.lang.String methodName,
                         int paramCount,
                         java.lang.String[] paramTypes)
Construct a "call method" rule with the specified method name.

Parameters:
digester - The associated Digester
methodName - Method name of the parent method to call
paramCount - The number of parameters to collect, or zero for a single argument from the body of ths element
paramTypes - The Java class names of the arguments
Method Detail

begin

public void begin(org.xml.sax.Attributes attributes)
           throws java.lang.Exception
Process the start of this element.

Overrides:
begin in class XRule
Parameters:
attributes - The attribute list for this element
Throws:
java.lang.Exception - Exception description not provided

body

public void body(java.lang.String bodyText)
          throws java.lang.Exception
Process the body text of this element.

Overrides:
body in class XRule
Parameters:
bodyText - The body text of this element
Throws:
java.lang.Exception - Exception description not provided

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

toString

public java.lang.String toString()
Returns:
short string representation of current object