polyglot.ext.jl.types
Class LocalInstance_c

java.lang.Object
  extended by polyglot.ext.jl.types.TypeObject_c
      extended by polyglot.ext.jl.types.VarInstance_c
          extended by polyglot.ext.jl.types.LocalInstance_c
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, LocalInstance, TypeObject, VarInstance, Copy

public class LocalInstance_c
extends VarInstance_c
implements LocalInstance

A LocalInstance contains type information for a local variable.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class polyglot.ext.jl.types.VarInstance_c
constantValue, flags, isConstant, name, type
 
Fields inherited from class polyglot.ext.jl.types.TypeObject_c
position, ts
 
Constructor Summary
protected LocalInstance_c()
          Used for deserializing types.
  LocalInstance_c(TypeSystem ts, Position pos, Flags flags, Type type, java.lang.String name)
           
 
Method Summary
 LocalInstance constantValue(java.lang.Object constantValue)
          Set the local's constant value.
 boolean equalsImpl(TypeObject o)
          Default implementation is pointer equality.
 LocalInstance flags(Flags flags)
          Set the local's flags.
 boolean isCanonical()
          Return true if the type object contains no unknown/ambiguous types.
 LocalInstance name(java.lang.String name)
          Set the local's name.
 void setConstantValue(java.lang.Object constantValue)
          Destructively set the local's constant value.
 java.lang.String toString()
           
 LocalInstance type(Type type)
          Set the local's type.
 
Methods inherited from class polyglot.ext.jl.types.VarInstance_c
constantValue, flags, hashCode, isConstant, name, setFlags, setType, type
 
Methods inherited from class polyglot.ext.jl.types.TypeObject_c
copy, equals, position, typeSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.types.VarInstance
constantValue, flags, isConstant, name, setFlags, setType, type
 
Methods inherited from interface polyglot.types.TypeObject
position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Constructor Detail

LocalInstance_c

protected LocalInstance_c()
Used for deserializing types.


LocalInstance_c

public LocalInstance_c(TypeSystem ts,
                       Position pos,
                       Flags flags,
                       Type type,
                       java.lang.String name)
Method Detail

setConstantValue

public void setConstantValue(java.lang.Object constantValue)
Description copied from interface: LocalInstance
Destructively set the local's constant value.

Specified by:
setConstantValue in interface LocalInstance

constantValue

public LocalInstance constantValue(java.lang.Object constantValue)
Description copied from interface: LocalInstance
Set the local's constant value.

Specified by:
constantValue in interface LocalInstance

flags

public LocalInstance flags(Flags flags)
Description copied from interface: LocalInstance
Set the local's flags.

Specified by:
flags in interface LocalInstance

name

public LocalInstance name(java.lang.String name)
Description copied from interface: LocalInstance
Set the local's name.

Specified by:
name in interface LocalInstance

type

public LocalInstance type(Type type)
Description copied from interface: LocalInstance
Set the local's type.

Specified by:
type in interface LocalInstance

equalsImpl

public boolean equalsImpl(TypeObject o)
Description copied from class: TypeObject_c
Default implementation is pointer equality.

Specified by:
equalsImpl in interface TypeObject
Overrides:
equalsImpl in class VarInstance_c
See Also:
TypeObject_c.equalsImpl(TypeObject), Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isCanonical

public boolean isCanonical()
Description copied from interface: TypeObject
Return true if the type object contains no unknown/ambiguous types.

Specified by:
isCanonical in interface TypeObject
Overrides:
isCanonical in class VarInstance_c