public class DeclaredTypeFactory extends java.lang.Object implements ITypeFactory<java.lang.Class<?>>
types
.
Clients are not supposed to use this class directly but the IJvmTypeProvider
or TypeReferences
instead. Those will take care of types that are requested more than once and therefore should return the very same
type
on subsequent queries.Constructor and Description |
---|
DeclaredTypeFactory(ClassURIHelper uriHelper) |
Modifier and Type | Method and Description |
---|---|
protected JvmAnnotationType |
createAnnotationProxy(java.lang.Class<? extends java.lang.annotation.Annotation> type) |
protected JvmAnnotationReference |
createAnnotationReference(java.lang.annotation.Annotation annotation) |
protected JvmAnnotationType |
createAnnotationType(java.lang.Class<?> clazz) |
protected org.eclipse.emf.ecore.EStructuralFeature.Setting |
createAnnotationValue(java.lang.Class<?> type) |
protected JvmAnnotationValue |
createAnnotationValue(java.lang.Object value,
java.lang.Class<?> type) |
protected void |
createAnnotationValues(java.lang.reflect.AnnotatedElement annotated,
JvmAnnotationTarget result) |
protected JvmAnnotationValue |
createArrayAnnotationValue(java.lang.Object value,
java.lang.Class<?> type) |
protected JvmTypeReference |
createArrayTypeReference(java.lang.reflect.Type componentType) |
protected JvmConstructor |
createConstructor(java.lang.reflect.Constructor<?> constructor) |
protected void |
createConstructors(java.lang.Class<?> clazz,
JvmDeclaredType result) |
protected JvmEnumerationType |
createEnumerationType(java.lang.Class<?> clazz) |
protected JvmEnumerationLiteral |
createEnumLiteralProxy(java.lang.Enum<?> e) |
protected JvmField |
createField(java.lang.reflect.Field field) |
protected void |
createFields(java.lang.Class<?> clazz,
JvmDeclaredType result) |
protected JvmFormalParameter |
createFormalParameter(java.lang.reflect.Type parameterType,
java.lang.String paramName,
JvmMember container,
java.lang.reflect.GenericDeclaration member,
java.lang.annotation.Annotation[] annotations) |
protected JvmTypeReference |
createLocalArrayTypeReference(java.lang.reflect.Type componentType,
JvmTypeParameterDeclarator container,
java.lang.reflect.GenericDeclaration member) |
protected JvmTypeReference |
createLocalTypeReference(java.lang.reflect.Type type,
JvmTypeParameterDeclarator container,
java.lang.reflect.GenericDeclaration member) |
protected JvmOperation |
createMethodProxy(java.lang.reflect.Method method) |
protected void |
createMethods(java.lang.Class<?> clazz,
JvmDeclaredType result) |
protected void |
createNestedTypes(java.lang.Class<?> clazz,
JvmDeclaredType result) |
protected JvmOperation |
createOperation(java.lang.reflect.Method method) |
protected JvmType |
createProxy(java.lang.reflect.Type type) |
JvmDeclaredType |
createType(java.lang.Class<?> clazz)
Creates a new
type from the given class. |
protected JvmTypeReference |
createTypeArgument(java.lang.reflect.Type actualTypeArgument) |
protected JvmTypeParameter |
createTypeParameter(java.lang.reflect.TypeVariable<?> variable,
JvmMember container) |
protected JvmTypeReference |
createTypeReference(java.lang.reflect.Type type) |
protected <T extends java.lang.reflect.Member & java.lang.reflect.GenericDeclaration> |
enhanceExecutable(JvmExecutable result,
T member,
java.lang.String simpleName,
java.lang.reflect.Type[] parameterTypes,
java.lang.annotation.Annotation[][] annotations,
int offset) |
protected void |
enhanceGenericDeclaration(JvmExecutable result,
java.lang.reflect.GenericDeclaration declaration) |
protected ClassURIHelper |
getUriHelper() |
protected boolean |
isLocal(java.lang.reflect.Type parameterType,
java.lang.reflect.GenericDeclaration member) |
protected void |
logSignatureFormatError(java.lang.Class<?> clazz) |
protected void |
setSuperTypes(java.lang.Class<?> clazz,
JvmDeclaredType result) |
protected void |
setTypeModifiers(java.lang.Class<?> clazz,
JvmDeclaredType result) |
protected void |
setVisibility(java.lang.Class<?> clazz,
JvmMember result) |
protected void |
setVisibility(JvmMember result,
int modifiers) |
@Inject public DeclaredTypeFactory(ClassURIHelper uriHelper)
public JvmDeclaredType createType(java.lang.Class<?> clazz)
type
from the given class.createType
in interface ITypeFactory<java.lang.Class<?>>
protected void logSignatureFormatError(java.lang.Class<?> clazz)
protected void createAnnotationValues(java.lang.reflect.AnnotatedElement annotated, JvmAnnotationTarget result)
protected JvmAnnotationReference createAnnotationReference(java.lang.annotation.Annotation annotation)
protected JvmEnumerationLiteral createEnumLiteralProxy(java.lang.Enum<?> e)
protected JvmAnnotationValue createArrayAnnotationValue(java.lang.Object value, java.lang.Class<?> type)
protected JvmAnnotationValue createAnnotationValue(java.lang.Object value, java.lang.Class<?> type)
protected org.eclipse.emf.ecore.EStructuralFeature.Setting createAnnotationValue(java.lang.Class<?> type)
protected JvmAnnotationType createAnnotationProxy(java.lang.Class<? extends java.lang.annotation.Annotation> type)
protected JvmOperation createMethodProxy(java.lang.reflect.Method method)
protected void setTypeModifiers(java.lang.Class<?> clazz, JvmDeclaredType result)
protected void createNestedTypes(java.lang.Class<?> clazz, JvmDeclaredType result)
protected JvmAnnotationType createAnnotationType(java.lang.Class<?> clazz)
protected void setSuperTypes(java.lang.Class<?> clazz, JvmDeclaredType result)
protected void createFields(java.lang.Class<?> clazz, JvmDeclaredType result)
protected void createConstructors(java.lang.Class<?> clazz, JvmDeclaredType result)
protected void createMethods(java.lang.Class<?> clazz, JvmDeclaredType result)
protected JvmEnumerationType createEnumerationType(java.lang.Class<?> clazz)
protected void setVisibility(java.lang.Class<?> clazz, JvmMember result)
protected JvmTypeParameter createTypeParameter(java.lang.reflect.TypeVariable<?> variable, JvmMember container)
protected JvmTypeReference createTypeReference(java.lang.reflect.Type type)
protected JvmTypeReference createArrayTypeReference(java.lang.reflect.Type componentType)
protected JvmTypeReference createTypeArgument(java.lang.reflect.Type actualTypeArgument)
protected JvmType createProxy(java.lang.reflect.Type type)
protected JvmField createField(java.lang.reflect.Field field)
protected JvmConstructor createConstructor(java.lang.reflect.Constructor<?> constructor)
protected void setVisibility(JvmMember result, int modifiers)
protected <T extends java.lang.reflect.Member & java.lang.reflect.GenericDeclaration> void enhanceExecutable(JvmExecutable result, T member, java.lang.String simpleName, java.lang.reflect.Type[] parameterTypes, java.lang.annotation.Annotation[][] annotations, int offset)
protected void enhanceGenericDeclaration(JvmExecutable result, java.lang.reflect.GenericDeclaration declaration)
protected JvmOperation createOperation(java.lang.reflect.Method method)
protected JvmFormalParameter createFormalParameter(java.lang.reflect.Type parameterType, java.lang.String paramName, JvmMember container, java.lang.reflect.GenericDeclaration member, java.lang.annotation.Annotation[] annotations)
protected JvmTypeReference createLocalTypeReference(java.lang.reflect.Type type, JvmTypeParameterDeclarator container, java.lang.reflect.GenericDeclaration member)
protected JvmTypeReference createLocalArrayTypeReference(java.lang.reflect.Type componentType, JvmTypeParameterDeclarator container, java.lang.reflect.GenericDeclaration member)
protected boolean isLocal(java.lang.reflect.Type parameterType, java.lang.reflect.GenericDeclaration member)
protected ClassURIHelper getUriHelper()