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.

    • 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.
      MClass createClassToBuild​(java.lang.String packageName, java.lang.String className, java.lang.String[] importSpecs)  
      java.lang.String[] getClassNames()  
      • Methods inherited from class java.lang.Object

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

      • CachedClassBuilder

        public CachedClassBuilder()
    • Method Detail

      • 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:
      • createClassToBuild

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

        public java.lang.String[] getClassNames()