xdc.services.spec
Class Ref

java.lang.Object
  extended by xdc.services.spec.Ref
All Implemented Interfaces:
java.io.Serializable

public class Ref
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
Ref(java.lang.String name)
          External constructor.
 
Method Summary
 java.lang.String getId()
           
 Node getNode()
           
 Decl.Proxy getProxy()
           
 java.lang.String getScope()
           
 boolean isGlobal()
           
 Unit resolve(Unit uspec, boolean local)
          Resolve this reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ref

public Ref(java.lang.String name)
External constructor. Simple constructor that provides no file or line number information for the source of the reference.

Method Detail

getId

public final java.lang.String getId()

getNode

public final Node getNode()

getProxy

public final Decl.Proxy getProxy()

getScope

public final java.lang.String getScope()

isGlobal

public final boolean isGlobal()

resolve

public Unit resolve(Unit uspec,
                    boolean local)
Resolve this reference.

Parameters:
uspec - the module or interface making this reference.
local - if true, the reference is to a decl within the same unit making the reference. The text of the reference excludes the name of the unit.
Returns:
the unit that exports the referenced declaration. It is up to the caller to descend into the unit to find the actual declaration.
Throws:
SessionRuntimeException - if can't be resolved.