Top Description Fields Constructors Methods
org.apache.tomcat.util.digester

public Class ObjectCreateRule

extends Rule
Class Inheritance
Known Direct Subclasses
org.apache.catalina.startup.ListenerCreateRule
Imports
org.xml.sax.Attributes

Rule implementation that creates a new object and pushes it onto the object stack. When the element is complete, the object will be popped

Field Summary

Modifier and TypeField and Description
protected String
attributeName

The attribute containing an override class name if it is present.

protected String
className

The Java class name of the object to be created.

Inherited from org.apache.tomcat.util.digester.Rule:
digesternamespaceURIsm

Constructor Summary

AccessConstructor and Description
public
ObjectCreateRule(String
Java class name of the object to be created
className
)

Construct an object create rule with the specified class name.

public
ObjectCreateRule(String
Java class name of the object to be created
className
,
String
Attribute name which, if present, contains an override of the class name to create
attributeName
)

Construct an object create rule with the specified class name and an optional attribute name containing an override.

Method Summary

Modifier and TypeMethod and Description
public void
begin(String
the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
namespace
,
String
the local name if the parser is namespace aware, or just the element name otherwise
name
,
Attributes
The attribute list for this element
attributes
)

Overrides org.apache.tomcat.util.digester.Rule.begin.

Process the beginning of this element.

public void
end(String
the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
namespace
,
String
the local name if the parser is namespace aware, or just the element name otherwise
name
)

Overrides org.apache.tomcat.util.digester.Rule.end.

Process the end of this element.

protected String

Returns:

the class name
getRealClassName
(Attributes
The attribute list for this element
attributes
)

Return the actual class name of the class to be instantiated.

public String
toString()

Overrides java.lang.Object.toString.

Render a printable version of this Rule.

Inherited from org.apache.tomcat.util.digester.Rule:
bodyfinishgetDigestergetNamespaceURIsetDigestersetNamespaceURI

Field Detail

attributeNameback to summary
protected String attributeName

The attribute containing an override class name if it is present.

classNameback to summary
protected String className

The Java class name of the object to be created.

Constructor Detail

ObjectCreateRuleback to summary
public ObjectCreateRule(String className)

Construct an object create rule with the specified class name.

Parameters
className:String

Java class name of the object to be created

ObjectCreateRuleback to summary
public ObjectCreateRule(String className, String attributeName)

Construct an object create rule with the specified class name and an optional attribute name containing an override.

Parameters
className:String

Java class name of the object to be created

attributeName:String

Attribute name which, if present, contains an override of the class name to create

Method Detail

beginback to summary
public void begin(String namespace, String name, Attributes attributes) throws Exception

Overrides org.apache.tomcat.util.digester.Rule.begin.

Process the beginning of this element.

Parameters
namespace:String

the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace

name:String

the local name if the parser is namespace aware, or just the element name otherwise

attributes:Attributes

The attribute list for this element

Annotations
@Override
Exceptions
Exception:

Doc from org.apache.tomcat.util.digester.Rule.begin.

if an error occurs while processing the event

endback to summary
public void end(String namespace, String name) throws Exception

Overrides org.apache.tomcat.util.digester.Rule.end.

Process the end of this element.

Parameters
namespace:String

the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace

name:String

the local name if the parser is namespace aware, or just the element name otherwise

Annotations
@Override
Exceptions
Exception:

Doc from org.apache.tomcat.util.digester.Rule.end.

if an error occurs while processing the event

getRealClassNameback to summary
protected String getRealClassName(Attributes attributes)

Return the actual class name of the class to be instantiated.

Parameters
attributes:Attributes

The attribute list for this element

Returns:String

the class name

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Render a printable version of this Rule.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override