org.jboss.errai.codegen.meta.impl.build
Class BuildMetaConstructor
java.lang.Object
org.jboss.errai.codegen.meta.MetaMethod
org.jboss.errai.codegen.meta.MetaConstructor
org.jboss.errai.codegen.meta.impl.build.BuildMetaConstructor
- All Implemented Interfaces:
- Builder, HasAnnotations, MetaClassMember, MetaGenericDeclaration
public class BuildMetaConstructor
- extends MetaConstructor
- implements Builder
- Author:
- Mike Brock , Christian Sadilek
BuildMetaConstructor
public BuildMetaConstructor(BuildMetaClass declaringClass)
BuildMetaConstructor
public BuildMetaConstructor(BuildMetaClass declaringClass,
Statement body)
BuildMetaConstructor
public BuildMetaConstructor(BuildMetaClass declaringClass,
Statement body,
DefParameters defParameters)
BuildMetaConstructor
public BuildMetaConstructor(BuildMetaClass declaringClass,
Statement body,
Scope scope,
DefParameters defParameters)
getParameters
public MetaParameter[] getParameters()
- Specified by:
getParameters
in class MetaConstructor
getGenericParameterTypes
public MetaType[] getGenericParameterTypes()
- Specified by:
getGenericParameterTypes
in class MetaConstructor
isVarArgs
public boolean isVarArgs()
- Specified by:
isVarArgs
in class MetaConstructor
getDeclaringClass
public MetaClass getDeclaringClass()
- Specified by:
getDeclaringClass
in interface MetaClassMember
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interface MetaClassMember
isPublic
public boolean isPublic()
- Specified by:
isPublic
in interface MetaClassMember
isPrivate
public boolean isPrivate()
- Specified by:
isPrivate
in interface MetaClassMember
isProtected
public boolean isProtected()
- Specified by:
isProtected
in interface MetaClassMember
isFinal
public boolean isFinal()
- Specified by:
isFinal
in interface MetaClassMember
isStatic
public boolean isStatic()
- Specified by:
isStatic
in interface MetaClassMember
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interface MetaClassMember
isSynthetic
public boolean isSynthetic()
- Specified by:
isSynthetic
in interface MetaClassMember
isVolatile
public boolean isVolatile()
- Specified by:
isVolatile
in interface MetaClassMember
isSynchronized
public boolean isSynchronized()
- Specified by:
isSynchronized
in interface MetaClassMember
setScope
public void setScope(Scope scope)
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.
getBody
public Statement getBody()
setBody
public void setBody(Statement body)
setDefParameters
public void setDefParameters(DefParameters defParameters)
getCheckedExceptions
public MetaClass[] getCheckedExceptions()
- Specified by:
getCheckedExceptions
in class MetaMethod
getName
public String getName()
- Specified by:
getName
in interface MetaClassMember
- Specified by:
getName
in class MetaMethod
getReturnType
public MetaClass getReturnType()
- Description copied from class:
MetaMethod
- Returns the MetaClass representing this method's return type. The returned
MetaClass may have had its generic information erased.
- Specified by:
getReturnType
in class MetaMethod
- Returns:
getGenericReturnType
public MetaType getGenericReturnType()
- Description copied from class:
MetaMethod
- Returns the MetaType representing the return type of the method. In the
case of a plain, non-parameterized return type, this will return a
MetaClass
equivalent to the one returned by
MetaMethod.getReturnType()
. Other possible types could be
MetaWildcardType
, MetaParameterizedType
, and
MetaTypeVariable
.
As of Errai 2.2, some implementations of this method are incomplete and
will return null if they cannot make sense of the method's return type.
- Specified by:
getGenericReturnType
in class MetaMethod
- Returns:
isReifiedForm
public boolean isReifiedForm()
getReifiedFormOf
public MetaConstructor getReifiedFormOf()
setReifiedFormOf
public void setReifiedFormOf(MetaConstructor reifiedFormOf)
setConstructorComment
public void setConstructorComment(String constructorComment)
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
equals
public boolean equals(Object o)
- Overrides:
equals
in class MetaMethod
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.