Interface MetadataGeneratorContext

All Superinterfaces:
org.teavm.common.ServiceRepository
All Known Implementing Classes:
DefaultMetadataGeneratorContext

public interface MetadataGeneratorContext extends org.teavm.common.ServiceRepository

Represents context with compile-time information, that is useful for MetadataGenerator. This context is provided by the compiler infrastructure.

  • Method Details

    • getClassSource

      org.teavm.model.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 to TeaVM.
      Returns:
      properties.
    • createResource

      <T extends Resource> T createResource(Class<T> resourceType)
    • createFieldResource

      StaticFieldResource createFieldResource(org.teavm.model.FieldReference field)
      Creates a new resource that represents static field. Client code then may use Platform.objectFromResource(StaticFieldResource) to get actual field value.
      Parameters:
      field - field for which to create resource.
      Returns:
      a new resource.
    • createResourceArray

      <T extends Resource> ResourceArray<T> createResourceArray()
    • createResourceMap

      <T extends Resource> ResourceMap<T> createResourceMap()
    • getTypeDescriptor

      ResourceTypeDescriptor getTypeDescriptor(Class<? extends Resource> type)