org.apache.hivemind.schema.rules
Class InvokeParentRule

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.hivemind.schema.rules.BaseRule
          extended by org.apache.hivemind.schema.rules.InvokeParentRule
All Implemented Interfaces:
Locatable, LocationHolder, Rule

public class InvokeParentRule
extends BaseRule

Rule used to connect a child object to its parent by invoking a method on the parent, passing the child. The child object is the top object on the stack and the parent object is the next object down on the stack. Created from the <invoke-parent> element. Generally, this is the last rule in a sequence of rules.

Author:
Howard Lewis Ship

Constructor Summary
InvokeParentRule()
           
InvokeParentRule(java.lang.String methodName)
           
 
Method Summary
 void begin(SchemaProcessor processor, Element element)
          Invokes the named method on the parent object (using reflection).
 int getDepth()
           
 java.lang.String getMethodName()
           
 void setDepth(int i)
          Sets the depth of the parent object.
 void setMethodName(java.lang.String string)
           
 
Methods inherited from class org.apache.hivemind.schema.rules.BaseRule
end
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

InvokeParentRule

public InvokeParentRule()

InvokeParentRule

public InvokeParentRule(java.lang.String methodName)
Method Detail

begin

public void begin(SchemaProcessor processor,
                  Element element)
Invokes the named method on the parent object (using reflection).

Specified by:
begin in interface Rule
Overrides:
begin in class BaseRule

getMethodName

public java.lang.String getMethodName()

setMethodName

public void setMethodName(java.lang.String string)

getDepth

public int getDepth()
Since:
1.1

setDepth

public void setDepth(int i)
Sets the depth of the parent object. The default is 1.