Class EventProducerCollector


  • class EventProducerCollector
    extends java.lang.Object
    Finds EventProducer interfaces and builds the event model for them.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventProducerCollector()
      Creates a new EventProducerCollector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private EventMethodModel createMethodModel​(com.thoughtworks.qdox.model.JavaMethod method)  
      java.util.List<EventModel> getModels()
      Returns the event model that has been accumulated.
      private boolean implementsInterface​(com.thoughtworks.qdox.model.JavaClass clazz, java.lang.String intf)  
      protected void processEventProducerInterface​(com.thoughtworks.qdox.model.JavaClass clazz)
      Processes an EventProducer interface and creates an EventProducerModel from it.
      boolean scanFile​(java.io.File src)
      Scans a file and processes it if it extends the EventProducer interface.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • EventProducerCollector

        EventProducerCollector()
        Creates a new EventProducerCollector.
    • Method Detail

      • scanFile

        public boolean scanFile​(java.io.File src)
                         throws java.io.IOException,
                                EventConventionException,
                                java.lang.ClassNotFoundException
        Scans a file and processes it if it extends the EventProducer interface.
        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 occurs
        EventConventionException - if the EventProducer conventions are violated
        java.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.ClassNotFoundException
        Processes an EventProducer interface and creates an EventProducerModel from it.
        Parameters:
        clazz - the EventProducer interface
        Throws:
        EventConventionException - if the event producer conventions are violated
        java.lang.ClassNotFoundException - if a required class cannot be found
      • getModels

        public java.util.List<EventModel> getModels()
        Returns the event model that has been accumulated.
        Returns:
        the event model.