de.tuberlin.cs.cis.ocl.env
Class Annotation

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.env.Binding
        |
        +--de.tuberlin.cs.cis.ocl.env.Annotation

public class Annotation
extends Binding

An annotation on an Identifier. An annotation is used to differ between a name binding and annotation. Additionally it can annotate properties more then one value or type on an identifier.

Author:
fchabar

Constructor Summary
Annotation(Identifier id, Property property)
          Constructs an annotation annotating a property on an identifier.
Annotation(Identifier id, Type type)
          Constructs an annotation that annotates an identifier with a specified type.
Annotation(Identifier id, Type[] types)
          Constructs an annotation annotating more then one type on an identifier.
 
Method Summary
 Type[] getAnnotatedTypes()
          Returns the annotated types of the identifier.
 
Methods inherited from class de.tuberlin.cs.cis.ocl.env.Binding
getIdentifier, getProperty, getType, getValue, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Annotation

public Annotation(Identifier id,
                  Type type)
Constructs an annotation that annotates an identifier with a specified type.

Parameters:
id - the identifier.
type - the type to annotate.

Annotation

public Annotation(Identifier id,
                  Type[] types)
Constructs an annotation annotating more then one type on an identifier.

Parameters:
id - the identifier
types - the types to annotate

Annotation

public Annotation(Identifier id,
                  Property property)
Constructs an annotation annotating a property on an identifier.

Parameters:
id - identifier.
property - the property to annotate.
Method Detail

getAnnotatedTypes

public Type[] getAnnotatedTypes()
Returns the annotated types of the identifier.

Returns:
the annotated types of the identifier.