public class DummyClassGenerator
extends ClassGenerator
To generate a class that has all the fields and methods, except that fields are not initialized and methods are empty. It's intended for being used as a placeholder during code generation of reference to the "this" class itself.
| Fields inherited from class | Fields |
|---|---|
class ClassGenerator |
innerClasses |
| Constructor and description |
|---|
DummyClassGenerator(GeneratorContext context, org.objectweb.asm.ClassVisitor classVisitor, ClassLoader classLoader, String sourceFile)Creates a new dummy class generator that produces class structures without implementation. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected CompileUnit |
getCompileUnit()Returns the compile unit associated with the class currently being emitted. |
|
public void |
visitAnnotations(AnnotatedNode node)* Visits annotations on an AnnotatedNode, delegating to visitAnnotation(AnnotationNode). * *
|
|
public void |
visitClass(ClassNode classNode)* Visits a ClassNode, processing its annotations, package, imports, contents, and object initializers. * *
|
|
public void |
visitConstructor(ConstructorNode node)* Visits a ConstructorNode, processing its annotations, parameter annotations, and code block. * *
|
|
public void |
visitField(FieldNode fieldNode)* Visits a FieldNode, processing its annotations and initial value expression if present. * *
|
|
public void |
visitMethod(MethodNode node)* Visits a MethodNode, processing its annotations, parameter annotations, and code block. * *
|
|
protected void |
visitParameter(ASTNode node, Parameter parameter)Visits a single parameter declared by the supplied member node. |
|
protected void |
visitParameters(ASTNode node, Parameter[] parameters)Visits the parameters declared by the supplied member node. |
|
public void |
visitProperty(PropertyNode statement)* Visits a PropertyNode, processing its annotations, initial value expression, * and getter/setter blocks if present. * *
|
Creates a new dummy class generator that produces class structures without implementation.
context - the generator contextclassVisitor - the ASM class visitor to write toclassLoader - the class loader (currently unused)sourceFile - the source file name (currently unused)Returns the compile unit associated with the class currently being emitted.
* Visits annotations on an AnnotatedNode, delegating to visitAnnotation(AnnotationNode). * *
node - the annotated node containing annotations to visit* Visits a ClassNode, processing its annotations, package, imports, contents, and object initializers. * *
node - the class node to visit* Visits a ConstructorNode, processing its annotations, parameter annotations, and code block. * *
node - the constructor node to visit* Visits a FieldNode, processing its annotations and initial value expression if present. * *
node - the field node to visit* Visits a MethodNode, processing its annotations, parameter annotations, and code block. * *
node - the method node to visitVisits a single parameter declared by the supplied member node.
node - the owning constructor or methodparameter - the parameter to visitVisits the parameters declared by the supplied member node.
node - the owning constructor or methodparameters - the parameters to visit* Visits a PropertyNode, processing its annotations, initial value expression, * and getter/setter blocks if present. * *
node - the property node to visitCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.