Class JavaCodeUnit

  • public class JavaCodeUnit
    extends CodeUnit
    Java code unit (a generated Java source file), covering multiple FunctionEmitter allowing to unify output, decoration and dynamic helper code injection per unit.
    • Field Detail

      • pkgName

        public final String pkgName
        Package name of this Java unit
      • className

        public final String className
        Simple class name of this Java unit
    • Constructor Detail

      • JavaCodeUnit

        public JavaCodeUnit​(String filename,
                            String packageName,
                            String simpleClassName,
                            Object generator)
                     throws IOException
        filename - the class's full filename to open w/ write access
        packageName - the package name of the class
        simpleClassName - the simple class name, i.e. w/o package name or c-file basename
        generator - informal optional object that is creating this unit, used to be mentioned in a warning message if not null.