com.sun.codemodel
Class JVar

java.lang.Object
  extended by com.sun.codemodel.JExpressionImpl
      extended by com.sun.codemodel.JVar
All Implemented Interfaces:
JAssignmentTarget, JDeclaration, JExpression
Direct Known Subclasses:
JFieldVar

public class JVar
extends JExpressionImpl
implements JDeclaration, JAssignmentTarget

Variables and fields.


Method Summary
 JExpression assign(JExpression rhs)
           
 JExpression assignPlus(JExpression rhs)
           
 void bind(JFormatter f)
           
 void declare(JFormatter f)
           
 void generate(JFormatter f)
           
 JVar init(JExpression init)
          Initialize this variable
 java.lang.String name()
          Get the name of this variable
 JType type()
          Return the type of this variable.
 
Methods inherited from class com.sun.codemodel.JExpressionImpl
_instanceof, band, bor, cand, complement, component, cor, decr, div, eq, gt, gte, incr, invoke, invoke, lt, lte, minus, minus, mod, mul, ne, not, plus, ref, ref, shl, shr, shrz, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.codemodel.JExpression
_instanceof, band, bor, cand, complement, component, cor, decr, div, eq, gt, gte, incr, invoke, invoke, lt, lte, minus, minus, mod, mul, ne, not, plus, ref, ref, shl, shr, shrz, xor
 

Method Detail

init

public JVar init(JExpression init)
Initialize this variable

Parameters:
init - JExpression to be used to initialize this field

name

public java.lang.String name()
Get the name of this variable

Returns:
Name of the variable

type

public JType type()
Return the type of this variable.


bind

public void bind(JFormatter f)

declare

public void declare(JFormatter f)
Specified by:
declare in interface JDeclaration

generate

public void generate(JFormatter f)

assign

public JExpression assign(JExpression rhs)
Specified by:
assign in interface JAssignmentTarget

assignPlus

public JExpression assignPlus(JExpression rhs)
Specified by:
assignPlus in interface JAssignmentTarget