org.quattor.pan.template
Class TypeMap

java.lang.Object
  extended by org.quattor.pan.template.TypeMap

public class TypeMap
extends java.lang.Object


Constructor Summary
TypeMap()
           
 
Method Summary
 FullType get(java.lang.String name)
          Return the type associated with the given name or null if it doesn't exist.
 void put(java.lang.String name, FullType fullType, Template template, SourceRange sourceRange)
          Associate the given type with the given name within this ObjectContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap()
Method Detail

get

public FullType get(java.lang.String name)
Return the type associated with the given name or null if it doesn't exist. It will always return null if the argument is null.

Parameters:
name - name of the type to retrieve
Returns:
FullType associated with this name or null if it doesn't exist

put

public void put(java.lang.String name,
                FullType fullType,
                Template template,
                SourceRange sourceRange)
         throws EvaluationException
Associate the given type with the given name within this ObjectContext. This will throw an EvaluationException if the type is already defined.

Parameters:
name - name to associate to the type
fullType - data type to use for the definition
template - template where the type is defined (used for error handling)
sourceRange - location in the template where the type is defined (used for error handling)
Throws:
EvaluationException - if there is already a type associated with the given name


Copyright © 2011 Quattor. All Rights Reserved.