org.apache.felix.scrplugin.annotations
Class ScannedAnnotation

java.lang.Object
  extended by org.apache.felix.scrplugin.annotations.ScannedAnnotation
Direct Known Subclasses:
ClassAnnotation, FieldAnnotation, MethodAnnotation

public abstract class ScannedAnnotation
extends java.lang.Object

Base class for all annotation.


Field Summary
protected  java.lang.String name
          The fully qualified class name
protected  java.util.Map<java.lang.String,java.lang.Object> values
          The annotation values.
 
Constructor Summary
ScannedAnnotation(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> values)
          Create a new description
 
Method Summary
 boolean getBooleanValue(java.lang.String name, boolean defaultValue)
          Get a boolean value of the annotation
 java.lang.String getEnumValue(java.lang.String name, java.lang.String defaultValue)
          Get an enumeration value of the annotation
 int getIntegerValue(java.lang.String name, int defaultValue)
          Get an integer value of the annotation
 long getLongValue(java.lang.String name, long defaultValue)
          Get a long value of the annotation
 java.lang.String getName()
          Get the fully qualified class name of the annotation.
 java.lang.String getSimpleName()
          Get the simple name of the annotation
 java.lang.String getStringValue(java.lang.String name, java.lang.String defaultValue)
          Get a string value of the annotation
 java.lang.Object getValue(java.lang.String paramName)
          Get a property value of the annotation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name
The fully qualified class name


values

protected final java.util.Map<java.lang.String,java.lang.Object> values
The annotation values.

Constructor Detail

ScannedAnnotation

public ScannedAnnotation(java.lang.String name,
                         java.util.Map<java.lang.String,java.lang.Object> values)
Create a new description

Parameters:
name - The fully qualified class name of the annotation
values - The properties of the annotation (optional)
Method Detail

getName

public java.lang.String getName()
Get the fully qualified class name of the annotation.

Returns:
The fully qualified class name of the annotation.

getSimpleName

public java.lang.String getSimpleName()
Get the simple name of the annotation


getValue

public java.lang.Object getValue(java.lang.String paramName)
Get a property value of the annotation.

Parameters:
paramName - The property name.
Returns:
The value of the property or null

getBooleanValue

public boolean getBooleanValue(java.lang.String name,
                               boolean defaultValue)
Get a boolean value of the annotation

Parameters:
name - The property name
defaultValue - A default value if the property is not set
Returns:
The property value or the default value.

getIntegerValue

public int getIntegerValue(java.lang.String name,
                           int defaultValue)
Get an integer value of the annotation

Parameters:
name - The property name
defaultValue - A default value if the property is not set
Returns:
The property value or the default value.

getLongValue

public long getLongValue(java.lang.String name,
                         long defaultValue)
Get a long value of the annotation

Parameters:
name - The property name
defaultValue - A default value if the property is not set
Returns:
The property value or the default value.

getStringValue

public java.lang.String getStringValue(java.lang.String name,
                                       java.lang.String defaultValue)
Get a string value of the annotation

Parameters:
name - The property name
defaultValue - A default value if the property is not set
Returns:
The property value or the default value.

getEnumValue

public java.lang.String getEnumValue(java.lang.String name,
                                     java.lang.String defaultValue)
Get an enumeration value of the annotation

Parameters:
name - The property name
defaultValue - A default value if the property is not set
Returns:
The property value or the default value.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.