Package org.codehaus.groovy.classgen
Class BytecodeSequence
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.stmt.Statement
org.codehaus.groovy.classgen.BytecodeSequence
- All Implemented Interfaces:
- NodeMetaDataHandler
public class BytecodeSequence extends Statement
This class represents a sequence of 
BytecodeInstructions
 or ASTNodes. The evaluation is depending on the type of
 the visitor.- 
Constructor SummaryConstructors Constructor Description BytecodeSequence(java.util.List<?> instructions)BytecodeSequence(BytecodeInstruction instruction)
- 
Method SummaryModifier and Type Method Description BytecodeInstructiongetBytecodeInstruction()Returns the singular BytecodeInstruction.java.util.List<?>getInstructions()voidvisit(GroovyCodeVisitor visitor)Delegates to the visit method used for this class.Methods inherited from class org.codehaus.groovy.ast.stmt.StatementaddStatementLabel, copyStatementLabels, getStatementLabel, getStatementLabels, isEmpty, setStatementLabelMethods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePositionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
- 
Constructor Details- 
BytecodeSequence
- 
BytecodeSequencepublic BytecodeSequence(java.util.List<?> instructions)
 
- 
- 
Method Details- 
getInstructionspublic java.util.List<?> getInstructions()
- 
getBytecodeInstructionReturns the singular BytecodeInstruction.- Returns:
- nullif instruction(s) is not a BytecodeInstruction
 
- 
visitDelegates to the visit method used for this class. If the visitor is a ClassGenerator, thenClassGenerator.visitBytecodeSequence(BytecodeSequence)is called with this instance. If the visitor is no ClassGenerator, then this method will call visit on each ASTNode element sorted by this class. If one element is a BytecodeInstruction, then it will be skipped as it is no ASTNode.- Overrides:
- visitin class- ASTNode
- See Also:
- ClassGenerator
 
 
-