public class BuildMetaField extends MetaField implements Builder
MetaField.ArrayLengthMetaField
Constructor and Description |
---|
BuildMetaField(BuildMetaClass declaringClass,
Statement statement,
Scope scope,
MetaClass type,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(Annotation annotation) |
<A extends Annotation> |
getAnnotation(Class<A> annotation) |
Annotation[] |
getAnnotations()
Returns the annotations present on this field.
|
MetaClass |
getDeclaringClass() |
String |
getDeclaringClassName() |
MetaType |
getGenericType()
Returns the actual unerased type of this field, which could be a MetaClass
(class, enum, interface, array, primitive, etc), a bounded or unbounded
type variable, or a wildcard.
|
String |
getName()
Returns this field's name without any type information or qualifiers.
|
MetaClass |
getType()
Returns an actual MetaClass (a class, interface, primitive type, array, or
enum, but not a type variable or a wildcard) representing an erased
type that is assignable to this field.
|
boolean |
isAbstract() |
boolean |
isFinal() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
boolean |
isSynchronized() |
boolean |
isSynthetic() |
boolean |
isTransient() |
boolean |
isVolatile() |
void |
setDeclaringClass(BuildMetaClass declaringClass) |
void |
setFieldComment(String fieldComment) |
void |
setFinal(boolean aFinal) |
void |
setGenericType(MetaType genericType) |
void |
setName(String name) |
void |
setScope(Scope scope) |
void |
setStatement(Statement statement) |
void |
setStatic(boolean aStatic) |
void |
setTransient(boolean aTransient) |
void |
setType(MetaClass type) |
void |
setVolatile(boolean aVolatile) |
String |
toJavaString()
Validates the statement and generates the String representation.
|
asField, equals, hashCode, hashString, toString
isAnnotationPresent
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isAnnotationPresent
public BuildMetaField(BuildMetaClass declaringClass, Statement statement, Scope scope, MetaClass type, String name)
public MetaClass getType()
MetaField
getType
in class MetaField
MetaField.getGenericType()
public MetaType getGenericType()
MetaField
MetaField.getType()
, any type
parameters on the field's type will be preserved in the returned MetaType
object.getGenericType
in class MetaField
public String getName()
MetaField
getName
in interface MetaClassMember
getName
in class MetaField
public Annotation[] getAnnotations()
MetaField
getAnnotations
in interface HasAnnotations
getAnnotations
in class MetaField
public MetaClass getDeclaringClass()
getDeclaringClass
in interface MetaClassMember
public String getDeclaringClassName()
getDeclaringClassName
in interface MetaClassMember
public boolean isAbstract()
isAbstract
in interface MetaClassMember
public boolean isPublic()
isPublic
in interface MetaClassMember
public boolean isPrivate()
isPrivate
in interface MetaClassMember
public boolean isProtected()
isProtected
in interface MetaClassMember
public boolean isFinal()
isFinal
in interface MetaClassMember
public boolean isStatic()
isStatic
in interface MetaClassMember
public boolean isTransient()
isTransient
in interface MetaClassMember
public boolean isSynthetic()
isSynthetic
in interface MetaClassMember
public boolean isVolatile()
isVolatile
in interface MetaClassMember
public boolean isSynchronized()
isSynchronized
in interface MetaClassMember
public <A extends Annotation> A getAnnotation(Class<A> annotation)
getAnnotation
in interface HasAnnotations
public void setDeclaringClass(BuildMetaClass declaringClass)
public void setScope(Scope scope)
public void setType(MetaClass type)
public void setGenericType(MetaType genericType)
public void setName(String name)
public void setFinal(boolean aFinal)
public void setStatic(boolean aStatic)
public void setTransient(boolean aTransient)
public void setVolatile(boolean aVolatile)
public void addAnnotation(Annotation annotation)
public void setStatement(Statement statement)
public void setFieldComment(String fieldComment)
public String toJavaString()
Builder
toJavaString
in interface Builder
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.