Class CompositeJamClassBuilder

  • public class CompositeJamClassBuilder
    extends JamClassBuilder

    Composite implementation of JamClassBuilder. When building, the first one in the list to not return null wins.

    • Constructor Detail

      • CompositeJamClassBuilder

        public CompositeJamClassBuilder​(JamClassBuilder[] builders)
    • 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()!).
        init in class JamClassBuilder
      • build

        public MClass build​(String pkg,
                            String cname)
        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