antlraux package
v0.2.1

antlraux.context.types
Class DeclaredType

java.lang.Object
  |
  +--antlraux.context.types.CommonType
        |
        +--antlraux.context.types.DeclaredType
All Implemented Interfaces:
ModifiedType, Type
Direct Known Subclasses:
AttributeType, ClassType, MethodType

public class DeclaredType
extends CommonType
implements ModifiedType

This class is an extension of CommonType that implements ModifiedType, so it implements a very basic Type with modifiers.

The real interest of this class is subclassing. See ClassType.

Author:
Enrique José García Cota

Field Summary
protected  java.util.HashSet modifiers
           
 
Fields inherited from class antlraux.context.types.CommonType
name, tag
 
Fields inherited from interface antlraux.context.types.Type
DEFAULT_NAME, DEFAULT_TAG
 
Constructor Summary
DeclaredType()
           
DeclaredType(int tag, java.lang.String typeName)
           
 
Method Summary
 void addModifier(java.lang.String modifier)
          Adds a new modifier to the modifiers set
 void clearModifiers()
          Clears all modifiers
 boolean compareModifiers(ModifiedType other)
          Returns true if other has the same modifiers than "this"
 boolean equals(java.lang.Object other)
           
 boolean hasModifier(java.lang.String modifierName)
          Returns true if the Type has the modifier "modifierName"
 java.util.Enumeration modifiers()
          Returns the modifier list in form of Enumeration
 java.util.Set modifiersSet()
          Returns the modifiers set
 java.lang.String toString()
           
 
Methods inherited from class antlraux.context.types.CommonType
getName, getTag, setName, setTag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface antlraux.context.types.Type
getName, getTag, setName, setTag
 

Field Detail

modifiers

protected java.util.HashSet modifiers
Constructor Detail

DeclaredType

public DeclaredType()

DeclaredType

public DeclaredType(int tag,
                    java.lang.String typeName)
Method Detail

hasModifier

public boolean hasModifier(java.lang.String modifierName)
Description copied from interface: ModifiedType
Returns true if the Type has the modifier "modifierName"

Specified by:
hasModifier in interface ModifiedType

addModifier

public void addModifier(java.lang.String modifier)
Description copied from interface: ModifiedType
Adds a new modifier to the modifiers set

Specified by:
addModifier in interface ModifiedType

clearModifiers

public void clearModifiers()
Description copied from interface: ModifiedType
Clears all modifiers

Specified by:
clearModifiers in interface ModifiedType

modifiers

public java.util.Enumeration modifiers()
Description copied from interface: ModifiedType
Returns the modifier list in form of Enumeration

Specified by:
modifiers in interface ModifiedType

modifiersSet

public java.util.Set modifiersSet()
Description copied from interface: ModifiedType
Returns the modifiers set

Specified by:
modifiersSet in interface ModifiedType

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface Type
Overrides:
equals in class CommonType

compareModifiers

public boolean compareModifiers(ModifiedType other)
Description copied from interface: ModifiedType
Returns true if other has the same modifiers than "this"

Specified by:
compareModifiers in interface ModifiedType

toString

public java.lang.String toString()
Specified by:
toString in interface Type
Overrides:
toString in class CommonType

antlraux package
v0.2.1

Created by Enrique José García Cota