Class JaninoCompiler.AccountingClassLoader

  • Enclosing class:
    JaninoCompiler

    private static class JaninoCompiler.AccountingClassLoader
    extends org.codehaus.janino.JavaSourceClassLoader
    Refinement of JavaSourceClassLoader which keeps track of the total bytecode length of the classes it has compiled.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoader

        org.codehaus.commons.compiler.AbstractJavaSourceClassLoader.ProtectionDomainFactory
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File destDir  
      private int nBytes  
      • Fields inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoader

        optionalProtectionDomainFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      AccountingClassLoader​(java.lang.ClassLoader parentClassLoader, org.codehaus.janino.util.resource.ResourceFinder sourceFinder, java.lang.String optionalCharacterEncoding, java.io.File destDir)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​byte[]> generateBytecodes​(java.lang.String name)  
      (package private) int getTotalByteCodeSize()  
      • Methods inherited from class org.codehaus.janino.JavaSourceClassLoader

        findClass, setCompileErrorHandler, setDebuggingInfo, setSourceFileCharacterEncoding, setSourcePath, setWarningHandler
      • Methods inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoader

        main, setProtectionDomainFactory
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • destDir

        private final java.io.File destDir
      • nBytes

        private int nBytes
    • Constructor Detail

      • AccountingClassLoader

        AccountingClassLoader​(java.lang.ClassLoader parentClassLoader,
                              org.codehaus.janino.util.resource.ResourceFinder sourceFinder,
                              java.lang.String optionalCharacterEncoding,
                              java.io.File destDir)
    • Method Detail

      • getTotalByteCodeSize

        int getTotalByteCodeSize()
      • generateBytecodes

        public java.util.Map<java.lang.String,​byte[]> generateBytecodes​(java.lang.String name)
                                                                       throws java.lang.ClassNotFoundException
        Overrides:
        generateBytecodes in class org.codehaus.janino.JavaSourceClassLoader
        Throws:
        java.lang.ClassNotFoundException