de.cau.cs.kieler.core.annotations
Class AnnotationsUtil

java.lang.Object
  extended by de.cau.cs.kieler.core.annotations.AnnotationsUtil

public final class AnnotationsUtil
extends Object

Utility class for annotations.

Rating red

Method Summary
static Boolean getBoolean(Annotatable annotatable, String key)
          Retrieve a boolean value from an annotation.
static Float getFloat(Annotatable annotatable, String key)
          Retrieve a floating point value from an annotation.
static Integer getInt(Annotatable annotatable, String key)
          Retrieve an integer value from an annotation.
static String getString(Annotatable annotatable, String key)
          Retrieve a string value from an annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static String getString(Annotatable annotatable,
                               String key)
Retrieve a string value from an annotation.

Parameters:
annotatable - an annotatable object
key - the annotation key
Returns:
the annotation value, or null if there is none

getInt

public static Integer getInt(Annotatable annotatable,
                             String key)
Retrieve an integer value from an annotation.

Parameters:
annotatable - an annotatable object
key - the annotation key
Returns:
the annotation value, or null if there is none

getBoolean

public static Boolean getBoolean(Annotatable annotatable,
                                 String key)
Retrieve a boolean value from an annotation.

Parameters:
annotatable - an annotatable object
key - the annotation key
Returns:
the annotation value, or null if there is none

getFloat

public static Float getFloat(Annotatable annotatable,
                             String key)
Retrieve a floating point value from an annotation.

Parameters:
annotatable - an annotatable object
key - the annotation key
Returns:
the annotation value, or null if there is none