org.codehaus.groovy.classgen
Class Variable

java.lang.Object
  extended byorg.codehaus.groovy.classgen.Variable

public class Variable
extends java.lang.Object

Represents compile time variable metadata while compiling a method.

Version:
$Revision: 1.7 $
Author:
James Strachan

Field Summary
private  org.objectweb.asm.Label endLabel
           
private  boolean holder
           
private  int index
           
private  java.lang.String name
           
private  boolean property
           
private  org.objectweb.asm.Label startLabel
           
private  Type type
           
 
Constructor Summary
Variable(int index, Type type, java.lang.String name)
           
 
Method Summary
 Variable deriveBoxedVersion()
          derive a new Variable from this if this is a primitive variable, or return this instance
 org.objectweb.asm.Label getEndLabel()
           
 int getIndex()
           
 java.lang.String getName()
           
 org.objectweb.asm.Label getStartLabel()
           
 Type getType()
           
 java.lang.String getTypeName()
           
 boolean isHolder()
           
 boolean isProperty()
           
 void setDynamic(boolean b)
           
 void setEndLabel(org.objectweb.asm.Label endLabel)
           
 void setHolder(boolean holder)
           
 void setProperty(boolean property)
           
 void setStartLabel(org.objectweb.asm.Label startLabel)
           
 void setType(Type type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

private int index

type

private Type type

name

private java.lang.String name

holder

private boolean holder

property

private boolean property

startLabel

private org.objectweb.asm.Label startLabel

endLabel

private org.objectweb.asm.Label endLabel
Constructor Detail

Variable

public Variable(int index,
                Type type,
                java.lang.String name)
Method Detail

getName

public java.lang.String getName()

getType

public Type getType()

getTypeName

public java.lang.String getTypeName()

getIndex

public int getIndex()
Returns:
the stack index for this variable

isHolder

public boolean isHolder()
Returns:
is this local variable shared in other scopes (and so must use a ValueHolder)

setHolder

public void setHolder(boolean holder)

isProperty

public boolean isProperty()

setProperty

public void setProperty(boolean property)

getStartLabel

public org.objectweb.asm.Label getStartLabel()

setStartLabel

public void setStartLabel(org.objectweb.asm.Label startLabel)

getEndLabel

public org.objectweb.asm.Label getEndLabel()

setEndLabel

public void setEndLabel(org.objectweb.asm.Label endLabel)

toString

public java.lang.String toString()

deriveBoxedVersion

public Variable deriveBoxedVersion()
derive a new Variable from this if this is a primitive variable, or return this instance

Returns:

setType

public void setType(Type type)

setDynamic

public void setDynamic(boolean b)


Copyright © 2003-2005 The Codehaus. All Rights Reserved.