org.jboss.forge.parser.java.impl
Class AnnotationImpl<O extends JavaSource<O>,T>
java.lang.Object
org.jboss.forge.parser.java.impl.AnnotationImpl<O,T>
- All Implemented Interfaces:
- Internal, Annotation<O>, Origin<O>
public class AnnotationImpl<O extends JavaSource<O>,T>
- extends Object
- implements Annotation<O>
- Author:
- Lincoln Baxter, III
AnnotationImpl
public AnnotationImpl(AnnotationTarget<O,T> parent)
AnnotationImpl
public AnnotationImpl(AnnotationTarget<O,T> parent,
Object internal)
AnnotationImpl
public AnnotationImpl(AnnotationTarget<O,T> parent,
org.jboss.forge.parser.java.impl.AnnotationImpl.AnnotationType type)
getName
public String getName()
- Specified by:
getName
in interface Annotation<O extends JavaSource<O>>
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedName
in interface Annotation<O extends JavaSource<O>>
getLiteralValue
public String getLiteralValue()
throws IllegalStateException
- Specified by:
getLiteralValue
in interface Annotation<O extends JavaSource<O>>
- Throws:
IllegalStateException
getLiteralValue
public String getLiteralValue(String name)
- Specified by:
getLiteralValue
in interface Annotation<O extends JavaSource<O>>
getValues
public List<ValuePair> getValues()
- Specified by:
getValues
in interface Annotation<O extends JavaSource<O>>
getStringValue
public String getStringValue()
throws IllegalStateException
- Specified by:
getStringValue
in interface Annotation<O extends JavaSource<O>>
- Throws:
IllegalStateException
getStringValue
public String getStringValue(String name)
- Specified by:
getStringValue
in interface Annotation<O extends JavaSource<O>>
isMarker
public boolean isMarker()
- Specified by:
isMarker
in interface Annotation<O extends JavaSource<O>>
isNormal
public boolean isNormal()
- Specified by:
isNormal
in interface Annotation<O extends JavaSource<O>>
isSingleValue
public boolean isSingleValue()
- Specified by:
isSingleValue
in interface Annotation<O extends JavaSource<O>>
removeAllValues
public Annotation<O> removeAllValues()
- Specified by:
removeAllValues
in interface Annotation<O extends JavaSource<O>>
removeValue
public Annotation<O> removeValue(String name)
- Specified by:
removeValue
in interface Annotation<O extends JavaSource<O>>
setName
public Annotation<O> setName(String className)
- Specified by:
setName
in interface Annotation<O extends JavaSource<O>>
setLiteralValue
public Annotation<O> setLiteralValue(String value)
- Specified by:
setLiteralValue
in interface Annotation<O extends JavaSource<O>>
setLiteralValue
public Annotation<O> setLiteralValue(String name,
String value)
- Specified by:
setLiteralValue
in interface Annotation<O extends JavaSource<O>>
setStringValue
public Annotation<O> setStringValue(String value)
- Specified by:
setStringValue
in interface Annotation<O extends JavaSource<O>>
setStringValue
public Annotation<O> setStringValue(String name,
String value)
- Specified by:
setStringValue
in interface Annotation<O extends JavaSource<O>>
getEnumValue
public <E extends Enum<E>> E getEnumValue(Class<E> type)
- Specified by:
getEnumValue
in interface Annotation<O extends JavaSource<O>>
getEnumValue
public <E extends Enum<E>> E getEnumValue(Class<E> type,
String name)
- Specified by:
getEnumValue
in interface Annotation<O extends JavaSource<O>>
setEnumValue
public Annotation<O> setEnumValue(String name,
Enum<?> value)
- Specified by:
setEnumValue
in interface Annotation<O extends JavaSource<O>>
setEnumValue
public Annotation<O> setEnumValue(Enum<?>... values)
- Specified by:
setEnumValue
in interface Annotation<O extends JavaSource<O>>
getOrigin
public O getOrigin()
- Specified by:
getOrigin
in interface Origin<O extends JavaSource<O>>
- Returns:
- the instance of the root ancestor.
getInternal
public Object getInternal()
- Description copied from interface:
Internal
- Returns the implementation-specific Object representing
this
. Do not call this method unless
you are willing to risk breaking backwards compatibility if future versions do not use the same internal object
implementations.
- Specified by:
getInternal
in interface Internal
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.