Top Description Fields Constructors Methods
javassist.compiler.ast

public Class ASTList

extends ASTree
Class Inheritance
Known Direct Subclasses
javassist.compiler.ast.CastExpr, javassist.compiler.ast.CondExpr, javassist.compiler.ast.Declarator, javassist.compiler.ast.Expr, javassist.compiler.ast.FieldDecl, javassist.compiler.ast.MethodDecl, javassist.compiler.ast.NewExpr, javassist.compiler.ast.Stmnt, javassist.compiler.ast.ArrayInit
Imports
javassist.compiler.CompileError

A linked list. The right subtree must be an ASTList object or null.

Field Summary

Modifier and TypeField and Description
private ASTree
private ASTList
private static final long

Constructor Summary

AccessConstructor and Description
public
ASTList(ASTree _head, ASTList _tail)

public
ASTList(ASTree _head)

Method Summary

Modifier and TypeMethod and Description
public void
accept(Visitor v)

Implements abstract javassist.compiler.ast.ASTree.accept.

Is a method for the visitor pattern.

public static ASTList
append(ASTList a, ASTree b)

Appends an object to a list.

public static ASTList
concat(ASTList a, ASTList b)

Concatenates two lists.

public ASTree
public ASTree
public ASTree
head()

Returns the car part of the list.

public int
length()

Returns the number of the elements in this list.

public static int
public static ASTList
make(ASTree e1, ASTree e2, ASTree e3)

public void
setHead(ASTree _head)

public void
public void
public void
public ASTList
sublist(int
zero or more than zero.
nth
)

Returns a sub list of the list.

public boolean
subst(ASTree newObj, ASTree oldObj)

Substitutes newObj for oldObj in the list.

public ASTList
tail()

Returns the cdr part of the list.

public String
toString()

Overrides javassist.compiler.ast.ASTree.toString.

Returns a string representation of the object.

Inherited from javassist.compiler.ast.ASTree:
getTag

Field Detail

leftback to summary
private ASTree left
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javassist.compiler.ast.ASTree.serialVersionUID.

default serialVersionUID

Constructor Detail

ASTListback to summary
public ASTList(ASTree _head, ASTList _tail)
ASTListback to summary
public ASTList(ASTree _head)

Method Detail

acceptback to summary
public void accept(Visitor v) throws CompileError

Implements abstract javassist.compiler.ast.ASTree.accept.

Doc from javassist.compiler.ast.ASTree.accept.

Is a method for the visitor pattern. It calls atXXX() on the given visitor, where XXX is the class name of the node object.

Annotations
@Override
appendback to summary
public static ASTList append(ASTList a, ASTree b)

Appends an object to a list.

concatback to summary
public static ASTList concat(ASTList a, ASTList b)

Concatenates two lists.

getLeftback to summary
public ASTree getLeft()

Overrides javassist.compiler.ast.ASTree.getLeft.

Annotations
@Override
getRightback to summary
public ASTree getRight()

Overrides javassist.compiler.ast.ASTree.getRight.

Annotations
@Override
headback to summary
public ASTree head()

Returns the car part of the list.

lengthback to summary
public int length()

Returns the number of the elements in this list.

lengthback to summary
public static int length(ASTList list)
makeback to summary
public static ASTList make(ASTree e1, ASTree e2, ASTree e3)
setHeadback to summary
public void setHead(ASTree _head)
setLeftback to summary
public void setLeft(ASTree _left)

Overrides javassist.compiler.ast.ASTree.setLeft.

Annotations
@Override
setRightback to summary
public void setRight(ASTree _right)

Overrides javassist.compiler.ast.ASTree.setRight.

Annotations
@Override
setTailback to summary
public void setTail(ASTList _tail)
sublistback to summary
public ASTList sublist(int nth)

Returns a sub list of the list. The sub list begins with the n-th element of the list.

Parameters
nth:int

zero or more than zero.

substback to summary
public boolean subst(ASTree newObj, ASTree oldObj)

Substitutes newObj for oldObj in the list.

tailback to summary
public ASTList tail()

Returns the cdr part of the list.

toStringback to summary
public String toString()

Overrides javassist.compiler.ast.ASTree.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override