GlueGen: src/java/com/jogamp/gluegen/cgram/TNodeFactory.java Source File

GlueGen v2.6.0-rc-20250712 GlueGen, Native Binding Generator for Java™ (public API).

TNodeFactory.java
Go to the documentation of this file.
1package com.jogamp.gluegen.cgram;
2
3import antlr.ASTFactory;
4import antlr.collections.AST;
5
6/** This class extends ASTFactory to build instances
7 of class TNode */
8 public class TNodeFactory extends ASTFactory {
9
10 /** Create a new ampty AST node */
11 @Override
12 public AST create() {
13 return new TNode();
14 }
15
16 /** Create a new AST node from type and text */
17 @Override
18 public AST create(final int ttype, final String text) {
19 final AST ast = new TNode();
20 ast.setType(ttype);
21 ast.setText(text);
22 return ast;
23 }
24
25 /** Create a new AST node from an existing AST node */
26 @Override
27 public AST create(final AST ast) {
28 final AST newast = new TNode();
29 newast.setType(ast.getType());
30 newast.setText(ast.getText());
31 return newast;
32 }
33
34
35}
com.jogamp.gluegen.cgram.TNodeFactory
This class extends ASTFactory to build instances of class TNode.
Definition: TNodeFactory.java:8
com.jogamp.gluegen.cgram.TNodeFactory.create
AST create(final AST ast)
Create a new AST node from an existing AST node.
Definition: TNodeFactory.java:27
com.jogamp.gluegen.cgram.TNodeFactory.create
AST create()
Create a new ampty AST node.
Definition: TNodeFactory.java:12
com.jogamp.gluegen.cgram.TNodeFactory.create
AST create(final int ttype, final String text)
Create a new AST node from type and text.
Definition: TNodeFactory.java:18
com.jogamp.gluegen.cgram.TNode
Class TNode is an implementation of the AST interface and adds many useful features:
Definition: TNode.java:38