net.percederberg.mibble.value
Class ValueReference

java.lang.Object
  extended bynet.percederberg.mibble.MibValue
      extended bynet.percederberg.mibble.value.ValueReference

public class ValueReference
extends MibValue

A reference to a value symbol.

NOTE: This class is used internally during the MIB parsing only. After loading a MIB file successfully, all value references will have been resolved to other MIB values. Do NOT use or reference this class.

Since:
2.0

Constructor Summary
ValueReference(FileLocation location, MibContext context, java.lang.String name)
          Creates a new value reference.
 
Method Summary
 FileLocation getLocation()
          Returns the reference location.
 MibValue initialize(MibLoaderLog log)
          Initializes the MIB value.
 java.lang.Object toObject()
          Returns a Java object representation of this value.
 java.lang.String toString()
          Returns a string representation of this value.
 
Methods inherited from class net.percederberg.mibble.MibValue
createReference, getName, getReferenceSymbol, isReferenceTo, isReferenceTo, setReferenceSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueReference

public ValueReference(FileLocation location,
                      MibContext context,
                      java.lang.String name)
Creates a new value reference.

Parameters:
location - the reference location
context - the reference context
name - the reference name
Method Detail

initialize

public MibValue initialize(MibLoaderLog log)
                    throws MibException
Initializes the MIB value. This will remove all levels of indirection present, such as references to other values. No value information is lost by this operation. This method may modify this object as a side-effect, and will return the basic value.

NOTE: This is an internal method that should only be called by the MIB loader.

Specified by:
initialize in class MibValue
Parameters:
log - the MIB loader log
Returns:
the basic MIB value
Throws:
MibException - if an error was encountered during the initialization

getLocation

public FileLocation getLocation()
Returns the reference location.

Returns:
the reference location

toObject

public java.lang.Object toObject()
Returns a Java object representation of this value. This method will always return null.

Specified by:
toObject in class MibValue
Returns:
a Java object representation of this value

toString

public java.lang.String toString()
Returns a string representation of this value.

Returns:
a string representation of this value