public ClassNode getScriptClassDummy() { if (scriptDummy!=null) { setScriptBaseClassFromConfig(scriptDummy); return scriptDummy; } String name = getPackageName(); if (name == null) { name = ""; } // now let's use the file name to determine the class name if (getDescription() == null) { throw new RuntimeException("Cannot generate main(String[]) class for statements when we have no file description"); } name += GeneratorContext.encodeAsValidClassName(extractClassFromFileDescription()); ClassNode classNode; if (isPackageInfo()) { classNode = new ClassNode(name, ACC_ABSTRACT | ACC_INTERFACE, ClassHelper.OBJECT_TYPE); } else { classNode = new ClassNode(name, ACC_PUBLIC, ClassHelper.SCRIPT_TYPE); setScriptBaseClassFromConfig(classNode); classNode.setScript(true); classNode.setScriptBody(true); } scriptDummy = classNode; return classNode; }
public ClassNode getScriptClassDummy() { if (scriptDummy!=null) { setScriptBaseClassFromConfig(scriptDummy); return scriptDummy; } String name = getPackageName(); if (name == null) { name = ""; } // now let's use the file name to determine the class name if (getDescription() == null) { throw new RuntimeException("Cannot generate main(String[]) class for statements when we have no file description"); } name += extractClassFromFileDescription(); ClassNode classNode; if (isPackageInfo()) { classNode = new ClassNode(name, ACC_ABSTRACT | ACC_INTERFACE, ClassHelper.OBJECT_TYPE); } else { classNode = new ClassNode(name, ACC_PUBLIC, ClassHelper.SCRIPT_TYPE); setScriptBaseClassFromConfig(classNode); classNode.setScript(true); classNode.setScriptBody(true); } scriptDummy = classNode; return classNode; }
classNode.setScriptBody(true);
classNode.setScriptBody(true);
classNode.setScriptBody(true);