Package com.strobel.assembler.metadata
Class CoreMetadataFactory
- java.lang.Object
-
- com.strobel.assembler.metadata.CoreMetadataFactory
-
- All Implemented Interfaces:
MetadataFactory
public class CoreMetadataFactory extends java.lang.Object implements MetadataFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CoreMetadataFactory.ClassSignature
private static class
CoreMetadataFactory.MethodSignature
private class
CoreMetadataFactory.UnresolvedGenericType
private class
CoreMetadataFactory.UnresolvedType
-
Field Summary
Fields Modifier and Type Field Description private TypeDefinition
_owner
private IMetadataResolver
_resolver
private IGenericContext
_scope
private java.util.Stack<GenericParameter>
_tempScope
-
Constructor Summary
Constructors Modifier Constructor Description private
CoreMetadataFactory(TypeDefinition owner, IMetadataResolver resolver, IGenericContext scope)
-
Method Summary
-
-
-
Field Detail
-
_owner
private final TypeDefinition _owner
-
_resolver
private final IMetadataResolver _resolver
-
_scope
private final IGenericContext _scope
-
_tempScope
private final java.util.Stack<GenericParameter> _tempScope
-
-
Constructor Detail
-
CoreMetadataFactory
private CoreMetadataFactory(TypeDefinition owner, IMetadataResolver resolver, IGenericContext scope)
-
-
Method Detail
-
make
public static CoreMetadataFactory make(TypeDefinition owner, IGenericContext scope)
-
make
public static CoreMetadataFactory make(IMetadataResolver resolver, IGenericContext scope)
-
getScope
private IGenericContext getScope()
-
makeTypeVariable
public GenericParameter makeTypeVariable(java.lang.String name, FieldTypeSignature[] bounds)
- Specified by:
makeTypeVariable
in interfaceMetadataFactory
-
makeWildcard
public WildcardType makeWildcard(FieldTypeSignature superBound, FieldTypeSignature extendsBound)
- Specified by:
makeWildcard
in interfaceMetadataFactory
-
makeTypeBound
protected TypeReference makeTypeBound(FieldTypeSignature... bounds)
-
makeParameterizedType
public TypeReference makeParameterizedType(TypeReference declaration, TypeReference owner, TypeReference... typeArguments)
- Specified by:
makeParameterizedType
in interfaceMetadataFactory
-
findTypeVariable
public GenericParameter findTypeVariable(java.lang.String name)
- Specified by:
findTypeVariable
in interfaceMetadataFactory
-
findInnerClassEntry
private InnerClassEntry findInnerClassEntry(java.lang.String name)
-
makeNamedType
public TypeReference makeNamedType(java.lang.String name)
- Specified by:
makeNamedType
in interfaceMetadataFactory
-
makeArrayType
public TypeReference makeArrayType(TypeReference componentType)
- Specified by:
makeArrayType
in interfaceMetadataFactory
-
makeByte
public TypeReference makeByte()
- Specified by:
makeByte
in interfaceMetadataFactory
-
makeBoolean
public TypeReference makeBoolean()
- Specified by:
makeBoolean
in interfaceMetadataFactory
-
makeShort
public TypeReference makeShort()
- Specified by:
makeShort
in interfaceMetadataFactory
-
makeChar
public TypeReference makeChar()
- Specified by:
makeChar
in interfaceMetadataFactory
-
makeInt
public TypeReference makeInt()
- Specified by:
makeInt
in interfaceMetadataFactory
-
makeLong
public TypeReference makeLong()
- Specified by:
makeLong
in interfaceMetadataFactory
-
makeFloat
public TypeReference makeFloat()
- Specified by:
makeFloat
in interfaceMetadataFactory
-
makeDouble
public TypeReference makeDouble()
- Specified by:
makeDouble
in interfaceMetadataFactory
-
makeVoid
public TypeReference makeVoid()
- Specified by:
makeVoid
in interfaceMetadataFactory
-
makeMethodSignature
public IMethodSignature makeMethodSignature(TypeReference returnType, java.util.List<TypeReference> parameterTypes, java.util.List<GenericParameter> genericParameters, java.util.List<TypeReference> thrownTypes)
- Specified by:
makeMethodSignature
in interfaceMetadataFactory
-
makeClassSignature
public IClassSignature makeClassSignature(TypeReference baseType, java.util.List<TypeReference> interfaceTypes, java.util.List<GenericParameter> genericParameters)
- Specified by:
makeClassSignature
in interfaceMetadataFactory
-
-