Errai 3.0.1-SNAPSHOT

org.jboss.errai.codegen.meta.impl.gwt
Class GWTClass

java.lang.Object
  extended by org.jboss.errai.codegen.meta.MetaClass
      extended by org.jboss.errai.codegen.meta.impl.AbstractMetaClass<com.google.gwt.core.ext.typeinfo.JType>
          extended by org.jboss.errai.codegen.meta.impl.gwt.GWTClass
All Implemented Interfaces:
HasAnnotations, MetaGenericDeclaration, MetaType

public class GWTClass
extends AbstractMetaClass<com.google.gwt.core.ext.typeinfo.JType>

Author:
Mike Brock , Christian Sadilek

Field Summary
protected  Annotation[] annotations
           
protected  com.google.gwt.core.ext.typeinfo.TypeOracle oracle
           
 
Fields inherited from class org.jboss.errai.codegen.meta.impl.AbstractMetaClass
genericSuperClass, parameterizedType
 
Constructor Summary
protected GWTClass(com.google.gwt.core.ext.typeinfo.TypeOracle oracle, com.google.gwt.core.ext.typeinfo.JType classType, boolean erased)
           
 
Method Summary
 MetaClass asArrayOf(int dimensions)
           
static MetaClass[] fromClassArray(com.google.gwt.core.ext.typeinfo.TypeOracle oracle, com.google.gwt.core.ext.typeinfo.JClassType[] classes)
           
 Annotation[] getAnnotations()
           
 String getCanonicalName()
           
 MetaClass getComponentType()
           
 MetaConstructor[] getConstructors()
           
 MetaClass[] getDeclaredClasses()
           
 MetaConstructor[] getDeclaredConstructors()
           
 MetaField getDeclaredField(String name)
           
 MetaField[] getDeclaredFields()
           
 MetaMethod[] getDeclaredMethods()
           
 MetaClass getErased()
          Returns a MetaClass that represents the same class as this one, but guaranteed to have no type parameters.
 MetaField getField(String name)
           
 MetaField[] getFields()
           
 String getFullyQualifiedName()
           
 MetaClass[] getInterfaces()
           
 String getInternalName()
           
 MetaMethod[] getMethods()
          Returns all declared and inherited public, protected, and package-private methods available on this class.
 String getName()
          Returns the name of this type as it was written in the original source code.
 String getPackageName()
           
static Class<?> getPrimitiveOrClass(com.google.gwt.core.ext.typeinfo.JParameter parm)
           
 MetaClass getSuperClass()
           
 MetaTypeVariable[] getTypeParameters()
          Returns the array of type variables declared on this generic declaration site, in the order they were declared in the source code.
 boolean isAbstract()
           
 boolean isAnnotation()
           
 boolean isAnonymousClass()
           
 boolean isArray()
           
 boolean isEnum()
           
 boolean isFinal()
           
 boolean isInterface()
           
 boolean isPrimitive()
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 boolean isSynthetic()
           
 boolean isVoid()
           
static Class<?>[] jParmToClass(com.google.gwt.core.ext.typeinfo.JParameter[] parms)
           
static MetaClass newInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle, com.google.gwt.core.ext.typeinfo.JType type)
           
static MetaClass newInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle, String type)
           
static MetaClass newUncachedInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle, com.google.gwt.core.ext.typeinfo.JType type)
           
static MetaClass newUncachedInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle, com.google.gwt.core.ext.typeinfo.JType type, boolean erased)
           
 
Methods inherited from class org.jboss.errai.codegen.meta.impl.AbstractMetaClass
_getConstructor, _getMethod, asBoxed, asClass, asUnboxed, equals, getAnnotation, getBeanDescriptor, getBestMatchingConstructor, getBestMatchingConstructor, getBestMatchingMethod, getBestMatchingMethod, getBestMatchingStaticMethod, getBestMatchingStaticMethod, getConstructor, getConstructor, getDeclaredConstructor, getDeclaredMethod, getDeclaredMethod, getEnclosedMetaObject, getFieldsAnnotatedWith, getFieldsWithMetaAnnotations, getFullyQualifiedNameWithTypeParms, getGenericSuperClass, getInheritedField, getInternalPrimitiveNameFrom, getMethod, getMethod, getMethodsAnnotatedWith, getMethodsWithMetaAnnotations, getOuterComponentType, getParameterizedType, getParametersAnnotatedWith, hashCode, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isDefaultInstantiable, isPrimitiveWrapper, toString
 
Methods inherited from class org.jboss.errai.codegen.meta.MetaClass
isConcrete
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

annotations

protected final Annotation[] annotations

oracle

protected com.google.gwt.core.ext.typeinfo.TypeOracle oracle
Constructor Detail

GWTClass

protected GWTClass(com.google.gwt.core.ext.typeinfo.TypeOracle oracle,
                   com.google.gwt.core.ext.typeinfo.JType classType,
                   boolean erased)
Method Detail

newInstance

public static MetaClass newInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle,
                                    com.google.gwt.core.ext.typeinfo.JType type)

newInstance

public static MetaClass newInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle,
                                    String type)

newUncachedInstance

public static MetaClass newUncachedInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle,
                                            com.google.gwt.core.ext.typeinfo.JType type)

newUncachedInstance

public static MetaClass newUncachedInstance(com.google.gwt.core.ext.typeinfo.TypeOracle oracle,
                                            com.google.gwt.core.ext.typeinfo.JType type,
                                            boolean erased)

fromClassArray

public static MetaClass[] fromClassArray(com.google.gwt.core.ext.typeinfo.TypeOracle oracle,
                                         com.google.gwt.core.ext.typeinfo.JClassType[] classes)

jParmToClass

public static Class<?>[] jParmToClass(com.google.gwt.core.ext.typeinfo.JParameter[] parms)
                               throws ClassNotFoundException
Throws:
ClassNotFoundException

getPrimitiveOrClass

public static Class<?> getPrimitiveOrClass(com.google.gwt.core.ext.typeinfo.JParameter parm)
                                    throws ClassNotFoundException
Throws:
ClassNotFoundException

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<com.google.gwt.core.ext.typeinfo.JType>

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

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.

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

isArray

public boolean isArray()
Specified by:
isArray in class MetaClass

getSuperClass

public MetaClass getSuperClass()
Specified by:
getSuperClass in class MetaClass

getComponentType

public MetaClass getComponentType()
Specified by:
getComponentType in class MetaClass

getAnnotations

public Annotation[] getAnnotations()

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.

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.

isVoid

public boolean isVoid()
Specified by:
isVoid in class MetaClass

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in class MetaClass

isInterface

public boolean isInterface()
Specified by:
isInterface in class MetaClass

isAbstract

public boolean isAbstract()
Specified by:
isAbstract 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

asArrayOf

public MetaClass asArrayOf(int dimensions)
Specified by:
asArrayOf in class MetaClass

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.