Top Description Fields Constructors Methods
org.glassfish.hk2.classmodel.reflect.impl

public Class AnnotatedElementImpl

extends Object
implements AnnotatedElement
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.classmodel.reflect.AnnotatedElement
Known Direct Subclasses
org.glassfish.hk2.classmodel.reflect.impl.FieldModelImpl, org.glassfish.hk2.classmodel.reflect.impl.MethodModelImpl, org.glassfish.hk2.classmodel.reflect.impl.ParameterImpl, org.glassfish.hk2.classmodel.reflect.impl.TypeImpl
Imports
org.glassfish.hk2.classmodel.reflect.*, java.util.concurrent.locks.ReentrantLock, java.util.*

Implementation of an annotated element
Author
Jerome Dochez

Field Summary

Modifier and TypeField and Description
private final List<AnnotationModel>
private boolean
private final ReentrantLock
private final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public AnnotationModel
getAnnotation(String name)

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getAnnotation.

Returns an annotation model if the type is annotated with the passed annotation name

public Collection<AnnotationModel>
getAnnotations()

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getAnnotations.

Returns a unmodifiable set of annotations that are present on this annotated element.

public String
getName()

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getName.

Annotated element have a name, which vary depending on the actual subclass type.

public boolean
public void
setApplicationClass(boolean applicationClass)

public String
shortDesc()

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.shortDesc.

Construct and return a short description name that can be used to display the instance value

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

annotationsback to summary
private final List<AnnotationModel> annotations
isApplicationClassback to summary
private boolean isApplicationClass
lockback to summary
private final ReentrantLock lock
nameback to summary
private final String name

Constructor Detail

AnnotatedElementImplback to summary
public AnnotatedElementImpl(String name)

Method Detail

addAnnotationback to summary
pack-priv void addAnnotation(AnnotationModel annotation)
getAnnotationback to summary
public AnnotationModel getAnnotation(String name)

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getAnnotation.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getAnnotation.

Returns an annotation model if the type is annotated with the passed annotation name

Annotations
@Override
getAnnotationsback to summary
public Collection<AnnotationModel> getAnnotations()

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getAnnotations.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getAnnotations.

Returns a unmodifiable set of annotations that are present on this annotated element.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getName.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotatedElement.getName.

Annotated element have a name, which vary depending on the actual subclass type. For instance, a class annotated element's name is the class name as obtained from Class#getName()

Annotations
@Override
isApplicationClassback to summary
public boolean isApplicationClass()
setApplicationClassback to summary
public void setApplicationClass(boolean applicationClass)
shortDescback to summary
public String shortDesc()

Implements org.glassfish.hk2.classmodel.reflect.AnnotatedElement.shortDesc.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotatedElement.shortDesc.

Construct and return a short description name that can be used to display the instance value

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override