Package org.apache.fop.tools
Class EventProducerCollector
- java.lang.Object
-
- org.apache.fop.tools.EventProducerCollector
-
class EventProducerCollector extends java.lang.ObjectFinds EventProducer interfaces and builds the event model for them.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCLASSNAME_EVENT_PRODUCERprivate java.util.List<EventModel>modelsprivate static java.util.Map<java.lang.String,java.lang.Class<?>>PRIMITIVE_MAP
-
Constructor Summary
Constructors Constructor Description EventProducerCollector()Creates a new EventProducerCollector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private EventMethodModelcreateMethodModel(com.thoughtworks.qdox.model.JavaMethod method)java.util.List<EventModel>getModels()Returns the event model that has been accumulated.private booleanimplementsInterface(com.thoughtworks.qdox.model.JavaClass clazz, java.lang.String intf)protected voidprocessEventProducerInterface(com.thoughtworks.qdox.model.JavaClass clazz)Processes an EventProducer interface and creates an EventProducerModel from it.booleanscanFile(java.io.File src)Scans a file and processes it if it extends theEventProducerinterface.
-
-
-
Field Detail
-
CLASSNAME_EVENT_PRODUCER
private static final java.lang.String CLASSNAME_EVENT_PRODUCER
-
PRIMITIVE_MAP
private static final java.util.Map<java.lang.String,java.lang.Class<?>> PRIMITIVE_MAP
-
models
private java.util.List<EventModel> models
-
-
Method Detail
-
scanFile
public boolean scanFile(java.io.File src) throws java.io.IOException, EventConventionException, java.lang.ClassNotFoundExceptionScans a file and processes it if it extends theEventProducerinterface.- Parameters:
src- the source file (a Java source file)- Returns:
- true if the file contained an EventProducer interface
- Throws:
java.io.IOException- if an I/O error occursEventConventionException- if the EventProducer conventions are violatedjava.lang.ClassNotFoundException- if a required class cannot be found
-
implementsInterface
private boolean implementsInterface(com.thoughtworks.qdox.model.JavaClass clazz, java.lang.String intf)
-
processEventProducerInterface
protected void processEventProducerInterface(com.thoughtworks.qdox.model.JavaClass clazz) throws EventConventionException, java.lang.ClassNotFoundExceptionProcesses an EventProducer interface and creates an EventProducerModel from it.- Parameters:
clazz- the EventProducer interface- Throws:
EventConventionException- if the event producer conventions are violatedjava.lang.ClassNotFoundException- if a required class cannot be found
-
createMethodModel
private EventMethodModel createMethodModel(com.thoughtworks.qdox.model.JavaMethod method) throws EventConventionException, java.lang.ClassNotFoundException
- Throws:
EventConventionExceptionjava.lang.ClassNotFoundException
-
getModels
public java.util.List<EventModel> getModels()
Returns the event model that has been accumulated.- Returns:
- the event model.
-
-