Package org.teavm.platform.metadata
Interface MetadataGeneratorContext
- All Superinterfaces:
ServiceRepository
Represents context with compile-time information, that is useful for MetadataGenerator
.
This context is provided by the compiler infrastructure.
- Author:
- Alexey Andreev
-
Method Summary
Modifier and TypeMethodDescriptioncreateFieldResource(FieldReference field)
Creates a new resource that represents static field.<T extends Resource>
TcreateResource(Class<T> resourceType)
Creates a new resource of the given type.<T extends Resource>
ResourceArray<T>Creates a new resource array.<T extends Resource>
ResourceMap<T>Creates a new resource map.Gets the class loader that is used by the compiler.Gets the collection of all classes that were reached by the dependency analyzer.Gets properties that were specified toTeaVM
.getTypeDescriptor(Class<? extends Resource> type)
Methods inherited from interface org.teavm.common.ServiceRepository
getService
-
Method Details
-
getClassSource
ClassReaderSource getClassSource()Gets the collection of all classes that were reached by the dependency analyzer.- Returns:
- class source.
-
getClassLoader
ClassLoader getClassLoader()Gets the class loader that is used by the compiler.- Returns:
- class loader.
-
getProperties
Properties getProperties()Gets properties that were specified toTeaVM
.- Returns:
- properties.
-
createResource
Creates a new resource of the given type. The description of valid resources is available in documentation forResource
.- Parameters:
resourceType
- type of resource to create.- Returns:
- a new resource
-
createFieldResource
Creates a new resource that represents static field. Client code then may usePlatform.objectFromResource(StaticFieldResource)
to get actual field value.- Parameters:
field
- field for which to create resource.- Returns:
- a new resource.
-
createResourceArray
Creates a new resource array.- Returns:
- a new resource.
-
createResourceMap
Creates a new resource map.- Returns:
- a new resource.
-
getTypeDescriptor
-