org.testng.internal
Class AnnotationTypeEnum

java.lang.Object
  extended by org.testng.internal.AnnotationTypeEnum
All Implemented Interfaces:
java.io.Serializable

public final class AnnotationTypeEnum
extends java.lang.Object
implements java.io.Serializable

AnnotationTypeEnum is an enumeration value representing the annotation type.

Author:
cquezel
See Also:
Serialized Form

Field Summary
static AnnotationTypeEnum JAVADOC
          javadoc annotation type
static AnnotationTypeEnum JDK
          JDK5 annotation type
 
Method Summary
 java.lang.String getName()
          Returns a human readable representation of the enum, suitable to be converted back to the enumeration by the valueOf method.
 java.lang.String toString()
          Returns the m_name of the annotation type.
static AnnotationTypeEnum valueOf(java.lang.String pAnnotationType)
          Returns an AnnotationTypeEnum object holding the value of the specified pAnnotationType.
static AnnotationTypeEnum valueOf(java.lang.String pAnnotationType, boolean strict)
          Returns an AnnotationTypeEnum object holding the value of the specified pAnnotationType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JAVADOC

public static final AnnotationTypeEnum JAVADOC
javadoc annotation type


JDK

public static final AnnotationTypeEnum JDK
JDK5 annotation type

Method Detail

valueOf

public static AnnotationTypeEnum valueOf(java.lang.String pAnnotationType)
Returns an AnnotationTypeEnum object holding the value of the specified pAnnotationType. This method throws an IllegalArgumentException if pAnnotationType is an illegal value or if this is version 14 and JDK5 annotations are specified.

Parameters:
pAnnotationType - the annotation type. This is one of the two constants (AnnotationTypeEnum.JAVADOC_ANNOTATION_TYPE or AnnotationTypeEnum.JDK5_ANNOTATION_TYPE). For backward compatibility we accept "1.4", "1.5". Any other value will default to AnnotationTypeEnum.JDK5 if this is the 1.5 version of TestNG or AnnotationTypeEnum.JAVADOC if this is the 1.4 version of TestNG.
Returns:
an AnnotationTypeEnum object holding the value of the specified pAnnotationType.

valueOf

public static AnnotationTypeEnum valueOf(java.lang.String pAnnotationType,
                                         boolean strict)
Returns an AnnotationTypeEnum object holding the value of the specified pAnnotationType. This method throws an IllegalArgumentException if pAnnotationType is an illegal value or if this is version 14 and JDK5 annotations are specified.

Parameters:
pAnnotationType - the annotation type. This is one of the two constants (AnnotationTypeEnum.JAVADOC_ANNOTATION_TYPE or AnnotationTypeEnum.JDK5_ANNOTATION_TYPE). For backward compatibility we accept "1.4", "1.5". Any other value will default to AnnotationTypeEnum.JDK5 if this is the 1.5 version of TestNG or AnnotationTypeEnum.JAVADOC if this is the 1.4 version of TestNG.
strict - flag indicating if compatibility check should be performed
Returns:
an AnnotationTypeEnum object holding the value of the specified pAnnotationType.

getName

public java.lang.String getName()
Returns a human readable representation of the enum, suitable to be converted back to the enumeration by the valueOf method.

Returns:
a human readable representation of the enum, suitable to be converted back to the enumeration by the valueOf method.

toString

public java.lang.String toString()
Returns the m_name of the annotation type.

Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.