org.jboss.errai.codegen.meta.impl.build
Class BuildMetaClass
java.lang.Object
org.jboss.errai.codegen.meta.MetaClass
org.jboss.errai.codegen.meta.impl.AbstractMetaClass<Object>
org.jboss.errai.codegen.meta.impl.build.BuildMetaClass
- All Implemented Interfaces:
- Builder, HasAnnotations, MetaGenericDeclaration, MetaType
public class BuildMetaClass
- extends AbstractMetaClass<Object>
- implements Builder
- Author:
- Mike Brock , Christian Sadilek
Methods inherited from class org.jboss.errai.codegen.meta.impl.AbstractMetaClass |
_getConstructor, _getMethod, asBoxed, asClass, asUnboxed, getAnnotation, getBeanDescriptor, getConstructor, getConstructor, getDeclaredConstructor, getDeclaredMethod, getDeclaredMethod, getEnclosedMetaObject, getFieldsAnnotatedWith, getFieldsWithMetaAnnotations, getFullyQualifiedNameWithTypeParms, getGenericSuperClass, getInheritedField, getInternalPrimitiveNameFrom, getMethod, getMethod, getMethodsAnnotatedWith, getMethodsWithMetaAnnotations, getOuterComponentType, getParameterizedType, getParametersAnnotatedWith, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isDefaultInstantiable, isPrimitiveWrapper, toString |
BuildMetaClass
public BuildMetaClass(Context context,
String name)
getErased
public MetaClass getErased()
- Description copied from class:
MetaClass
- Returns a MetaClass that represents the same class as this one, but
guaranteed to have no type parameters.
- Specified by:
getErased
in class MetaClass
- Returns:
- A raw MetaClass representing the same class as this MetaClass. If
this class has no type parameters in the first place, the receiving
MetaClass instance is returned.
getName
public String getName()
- Description copied from interface:
MetaType
- Returns the name of this type as it was written in the original source code.
- Specified by:
getName
in interface MetaType
- Specified by:
getName
in class MetaClass
- Returns:
- The name of this type as it was written in the original source code.
getFullyQualifiedName
public String getFullyQualifiedName()
- Specified by:
getFullyQualifiedName
in class MetaClass
getCanonicalName
public String getCanonicalName()
- Specified by:
getCanonicalName
in class MetaClass
getInternalName
public String getInternalName()
- Overrides:
getInternalName
in class AbstractMetaClass<Object>
getPackageName
public String getPackageName()
- Specified by:
getPackageName
in class MetaClass
getMethods
public MetaMethod[] getMethods()
- Description copied from class:
MetaClass
- Returns all declared and inherited public, protected, and package-private methods
available on this class.
- Specified by:
getMethods
in class MetaClass
getDeclaredMethods
public MetaMethod[] getDeclaredMethods()
- Specified by:
getDeclaredMethods
in class MetaClass
getFields
public MetaField[] getFields()
- Specified by:
getFields
in class MetaClass
getDeclaredFields
public MetaField[] getDeclaredFields()
- Specified by:
getDeclaredFields
in class MetaClass
getField
public MetaField getField(String name)
- Specified by:
getField
in class MetaClass
getDeclaredField
public MetaField getDeclaredField(String name)
- Specified by:
getDeclaredField
in class MetaClass
getConstructors
public MetaConstructor[] getConstructors()
- Specified by:
getConstructors
in class MetaClass
getDeclaredConstructors
public MetaConstructor[] getDeclaredConstructors()
- Specified by:
getDeclaredConstructors
in class MetaClass
getDeclaredClasses
public MetaClass[] getDeclaredClasses()
- Specified by:
getDeclaredClasses
in class MetaClass
getInterfaces
public MetaClass[] getInterfaces()
- Specified by:
getInterfaces
in class MetaClass
getSuperClass
public MetaClass getSuperClass()
- Specified by:
getSuperClass
in class MetaClass
getComponentType
public MetaClass getComponentType()
- Specified by:
getComponentType
in class MetaClass
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitive
in class MetaClass
isVoid
public boolean isVoid()
- Specified by:
isVoid
in class MetaClass
isInterface
public boolean isInterface()
- Specified by:
isInterface
in class MetaClass
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in class MetaClass
isArray
public boolean isArray()
- Specified by:
isArray
in class MetaClass
isEnum
public boolean isEnum()
- Specified by:
isEnum
in class MetaClass
isAnnotation
public boolean isAnnotation()
- Specified by:
isAnnotation
in class MetaClass
isPublic
public boolean isPublic()
- Specified by:
isPublic
in class MetaClass
isPrivate
public boolean isPrivate()
- Specified by:
isPrivate
in class MetaClass
isProtected
public boolean isProtected()
- Specified by:
isProtected
in class MetaClass
isFinal
public boolean isFinal()
- Specified by:
isFinal
in class MetaClass
isStatic
public boolean isStatic()
- Specified by:
isStatic
in class MetaClass
isSynthetic
public boolean isSynthetic()
- Specified by:
isSynthetic
in class MetaClass
isAnonymousClass
public boolean isAnonymousClass()
- Specified by:
isAnonymousClass
in class MetaClass
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interface HasAnnotations
getTypeParameters
public MetaTypeVariable[] getTypeParameters()
- Description copied from interface:
MetaGenericDeclaration
- Returns the array of type variables declared on this generic declaration
site, in the order they were declared in the source code.
- Specified by:
getTypeParameters
in interface MetaGenericDeclaration
- Returns:
- the type variables declared at this site. The returned array is
never null, but it will be empty if no type variable are declared
at this site.
setSuperClass
public void setSuperClass(MetaClass superClass)
setInterfaces
public void setInterfaces(List<MetaClass> interfaces)
setInterface
public void setInterface(boolean anInterface)
setAbstract
public void setAbstract(boolean anAbstract)
setArray
public void setArray(boolean array)
setDimensions
public void setDimensions(int dimensions)
getDimensions
public int getDimensions()
setFinal
public void setFinal(boolean aFinal)
setStatic
public void setStatic(boolean aStatic)
setInner
public void setInner(boolean aInner)
setScope
public void setScope(Scope scope)
setContext
public void setContext(Context context)
getContext
public Context getContext()
addAnnotation
public void addAnnotation(Annotation annotation)
addInnerClass
public void addInnerClass(InnerClass innerClass)
addInterface
public void addInterface(MetaClass interfaceClass)
addConstructor
public void addConstructor(BuildMetaConstructor constructor)
addMethod
public void addMethod(BuildMetaMethod method)
addField
public void addField(BuildMetaField field)
addTypeVariable
public void addTypeVariable(MetaTypeVariable typeVariable)
setParameterizedType
public void setParameterizedType(MetaParameterizedType parameterizedType)
isReifiedForm
public boolean isReifiedForm()
getReifiedFormOf
public MetaClass getReifiedFormOf()
setReifiedFormOf
public void setReifiedFormOf(MetaClass reifiedFormOf)
getBestMatchingMethod
public MetaMethod getBestMatchingMethod(String name,
Class... parameters)
- Overrides:
getBestMatchingMethod
in class AbstractMetaClass<Object>
getBestMatchingMethod
public MetaMethod getBestMatchingMethod(String name,
MetaClass... parameters)
- Overrides:
getBestMatchingMethod
in class AbstractMetaClass<Object>
getBestMatchingStaticMethod
public MetaMethod getBestMatchingStaticMethod(String name,
Class... parameters)
- Overrides:
getBestMatchingStaticMethod
in class AbstractMetaClass<Object>
getBestMatchingStaticMethod
public MetaMethod getBestMatchingStaticMethod(String name,
MetaClass... parameters)
- Overrides:
getBestMatchingStaticMethod
in class AbstractMetaClass<Object>
getBestMatchingConstructor
public MetaConstructor getBestMatchingConstructor(Class... parameters)
- Overrides:
getBestMatchingConstructor
in class AbstractMetaClass<Object>
getBestMatchingConstructor
public MetaConstructor getBestMatchingConstructor(MetaClass... parameters)
- Overrides:
getBestMatchingConstructor
in class AbstractMetaClass<Object>
asArrayOf
public MetaClass asArrayOf(int dimensions)
- Specified by:
asArrayOf
in class MetaClass
setClassComment
public void setClassComment(String classComment)
getStaticInitializer
public BlockStatement getStaticInitializer()
getInstanceInitializer
public BlockStatement getInstanceInitializer()
toJavaString
public String toJavaString()
- Description copied from interface:
Builder
- Validates the statement and generates the String representation.
- Specified by:
toJavaString
in interface Builder
- Returns:
- Java String representation
toJavaString
public String toJavaString(Context context)
membersToString
public String membersToString()
equals
public boolean equals(Object o)
- Overrides:
equals
in class AbstractMetaClass<Object>
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractMetaClass<Object>
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.