Class CachedClassBuilder

  • public class CachedClassBuilder
    extends JamClassBuilder

    A ClassBuilder that doesn't do any lazy building - it is just a cache of classes that are used when asked to build one. This is used by JamXmlReader, which does all of it's reading and building in a single pass.

    • Constructor Detail

      • CachedClassBuilder

        public CachedClassBuilder()
    • Method Detail

      • build

        public MClass build​(String packageName,
                            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
      • createClassToBuild

        public MClass createClassToBuild​(String packageName,
                                         String className,
                                         String[] importSpecs)
      • getClassNames

        public String[] getClassNames()