Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

weblogic.descriptor.annotation
Class AnnotationDefinition

java.lang.Object
  extended by weblogic.descriptor.annotation.AnnotationDefinition
Direct Known Subclasses:
AnnotationDefinition.EnumerationAnnotation, AnnotationDefinition.LegalStringAnnotation, AnnotationDefinition.UnSetValueAnnotation

public class AnnotationDefinition
extends Object

Repesents a javadoc annotation that may be used in the defintion of a descriptor bean.


Nested Class Summary
static class AnnotationDefinition.EnumerationAnnotation
           
static class AnnotationDefinition.LegalNullStringAnnotation
           
static class AnnotationDefinition.LegalStringAnnotation
          Covers both NULLABLE & LEGAL_ZERO_LENGTH annotations
static class AnnotationDefinition.LegalZeroLengthStringAnnotation
           
static class AnnotationDefinition.UnSetValueAnnotation
           
 
Field Summary
static int INHERIT_FROM_CLASS
          Flag indicating that member can inherit this annotation from its class.
static int INHERIT_FROM_SUPERCLASS
          Flag indicating that class can inherit this annotation from its superclass.
 
Constructor Summary
  AnnotationDefinition(String name)
           
protected AnnotationDefinition(String[] names)
           
protected AnnotationDefinition(String[] names, int flags)
          Construct annotation
protected AnnotationDefinition(String[] names, String[] allowedTypes)
           
protected AnnotationDefinition(String name, String alias)
           
protected AnnotationDefinition(String name, String alias1, String alias2)
           
 
Method Summary
protected  String constructMessage(String message, PropertyDeclaration declaration, String alias)
           
protected  void error(String message, PropertyDeclaration declaration, String alias)
           
 String[] getAliases()
           
 JAnnotationValue getAnnotationValue(JAnnotatedElement element)
           
 JAnnotationValue[] getAnnotationValues(JAnnotatedElement element)
          Copied and modified getAnnotationValue() by Eric.
 boolean isAllowedType(Class type)
           
 boolean isDefined(JAnnotatedElement element)
           
 String toString()
           
 List validate(PropertyDeclaration declaration, String alias)
           
protected  void warning(String message, PropertyDeclaration declaration, String alias)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INHERIT_FROM_CLASS

public static int INHERIT_FROM_CLASS
Flag indicating that member can inherit this annotation from its class.


INHERIT_FROM_SUPERCLASS

public static int INHERIT_FROM_SUPERCLASS
Flag indicating that class can inherit this annotation from its superclass.

Constructor Detail

AnnotationDefinition

protected AnnotationDefinition(String[] names,
                               int flags)
Construct annotation

Parameters:
names - - all names that can be used for this annotation
flags - - Any combination of AnnotationDefinition.INHERIT_FROM_CLASS and AnnotationDefinition.INHERIT_FROM_SUPERCLASS. Note that the combination of these flags allows a member to inherit its annotation from a the containing class or one of its superclasses.

AnnotationDefinition

protected AnnotationDefinition(String[] names)

AnnotationDefinition

protected AnnotationDefinition(String[] names,
                               String[] allowedTypes)

AnnotationDefinition

public AnnotationDefinition(String name)

AnnotationDefinition

protected AnnotationDefinition(String name,
                               String alias)

AnnotationDefinition

protected AnnotationDefinition(String name,
                               String alias1,
                               String alias2)
Method Detail

isDefined

public boolean isDefined(JAnnotatedElement element)

getAnnotationValue

public JAnnotationValue getAnnotationValue(JAnnotatedElement element)

getAnnotationValues

public JAnnotationValue[] getAnnotationValues(JAnnotatedElement element)
Copied and modified getAnnotationValue() by Eric. This is a much slower way of retrieving annotations. So if you know that there is just one annotation or if you are expecting only one annotation, use getAnnotationValue()

Returns:
an array of values, zero length array if none are present

toString

public String toString()
Overrides:
toString in class Object

getAliases

public String[] getAliases()

constructMessage

protected String constructMessage(String message,
                                  PropertyDeclaration declaration,
                                  String alias)

error

protected void error(String message,
                     PropertyDeclaration declaration,
                     String alias)

warning

protected void warning(String message,
                       PropertyDeclaration declaration,
                       String alias)

isAllowedType

public boolean isAllowedType(Class type)

validate

public List validate(PropertyDeclaration declaration,
                     String alias)

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01