Class EventMethodModel
java.lang.Object
org.apache.fop.events.model.EventMethodModel
- All Implemented Interfaces:
Serializable, org.apache.xmlgraphics.util.XMLizable
public class EventMethodModel
extends Object
implements Serializable, org.apache.xmlgraphics.util.XMLizable
Represents an event method. Each method in an event producer interface will result in one
instance of
EventMethodModel.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents an event parameter. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Listprivate static final longprivate EventSeverity -
Constructor Summary
ConstructorsConstructorDescriptionEventMethodModel(String methodName, EventSeverity severity) Creates an new instance. -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(Class type, String name) Adds a method parameter.voidAdds a method parameter.Returns the primary exception class for this event method.Returns the event method nameReturns an unmodifiable list of parameters for this event method.Returns the event's severity level.voidsetExceptionClass(String exceptionClass) Sets the primary exception class for this event method.voidsetMethodName(String name) Sets the event method name.voidsetSeverity(EventSeverity severity) Sets the event's severity level.voidtoSAX(ContentHandler handler)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
methodName
-
severity
-
params
-
exceptionClass
-
-
Constructor Details
-
EventMethodModel
Creates an new instance.- Parameters:
methodName- the event method's nameseverity- the event severity
-
-
Method Details
-
addParameter
Adds a method parameter.- Parameters:
param- the method parameter
-
addParameter
Adds a method parameter.- Parameters:
type- the type of the parametername- the name of the parameter- Returns:
- the resulting Parameter instance
-
setMethodName
Sets the event method name.- Parameters:
name- the event name
-
getMethodName
-
setSeverity
Sets the event's severity level.- Parameters:
severity- the severity
-
getSeverity
-
getParameters
Returns an unmodifiable list of parameters for this event method.- Returns:
- the list of parameters
-
setExceptionClass
Sets the primary exception class for this event method. Note: Not all event methods throw exceptions!- Parameters:
exceptionClass- the exception class
-
getExceptionClass
Returns the primary exception class for this event method. This method returns null if the event is only informational or just a warning.- Returns:
- the primary exception class or null
-
toSAX
- Specified by:
toSAXin interfaceorg.apache.xmlgraphics.util.XMLizable- Throws:
SAXException
-