net.percederberg.mib.type
Class NamedType

java.lang.Object
  |
  +--net.percederberg.mib.type.Type
        |
        +--net.percederberg.mib.type.NamedType

public class NamedType
extends Type

A class for handling type information for named types.

Version:
1.1
Author:
Per Cederberg, per@percederberg.net

Constructor Summary
NamedType(TypeSymbol sym)
          Creates a new named type based on the given type symbol.
NamedType(TypeSymbol sym, Constraint constraint)
          Creates a new named type based on the given type symbol.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks if this types equals any other object.
 java.lang.String toString()
          Returns a string description of this type.
 void transferType(TypeConverter converter)
          Transfers the type information from this type to a type converter object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedType

public NamedType(TypeSymbol sym)
Creates a new named type based on the given type symbol.

Parameters:
sym - a type symbol

NamedType

public NamedType(TypeSymbol sym,
                 Constraint constraint)
Creates a new named type based on the given type symbol.

Parameters:
sym - a type symbol
constraint - the named type constraint
Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks if this types equals any other object.

Specified by:
equals in class Type
Parameters:
obj - an object
Returns:
true if the objects are equal, or false otherwise

toString

public java.lang.String toString()
Returns a string description of this type.

Specified by:
toString in class Type
Returns:
a string description of the type

transferType

public void transferType(TypeConverter converter)
Transfers the type information from this type to a type converter object. The calling conventions declared in the TypeConverter class are followed.

Specified by:
transferType in class Type
Parameters:
converter - a type converter