Class ReflectClassBuilder

    • Constructor Summary

      Constructors 
      Constructor Description
      ReflectClassBuilder​(java.lang.ClassLoader rcl)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MClass build​(java.lang.String packageName, java.lang.String className)
      This is called by JAM when it attempts to load a class.
      void init​(ElementContext ctx)
      This method is called by JAM to initialize this class builder.
      void populate​(MClass dest)
      Called by JAM to 'fill out' an instance of a given MClass with things like methods and fields.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReflectClassBuilder

        public ReflectClassBuilder​(java.lang.ClassLoader rcl)
    • Method Detail

      • init

        public void init​(ElementContext ctx)
        Description copied from class: JamClassBuilder
        This method is called by JAM to initialize this class builder. Extending classes can override this to perform additional initialization work (just remember to call super.init()!).
        Overrides:
        init in class JamClassBuilder
      • build

        public MClass build​(java.lang.String packageName,
                            java.lang.String className)
        Description copied from class: JamClassBuilder

        This is called by JAM when it attempts to load a class. If the builder has access to an artifact (typically a java source or classfile) that represents the given type, it should call createClassToBuild() to get a new instance of MClass and then return it. No caching should be performed - if an MClass is going to be returned, it should be a new instance returned by createClassToBuild()

        If no artififact is available, the builder should just return null, signalling that other JamClassBuilders should attempt to build the class.

        Specified by:
        build in class JamClassBuilder
        Returns:
      • populate

        public void populate​(MClass dest)
        Description copied from interface: JamClassPopulator

        Called by JAM to 'fill out' an instance of a given MClass with things like methods and fields. The implementing builder is responsible for inspecting the source artifact (typically a source or class file) to call the appropriate createX methods on the given MClass.

        Specified by:
        populate in interface JamClassPopulator