Class Renderer
- java.lang.Object
-
- org.teavm.backend.javascript.rendering.Renderer
-
- All Implemented Interfaces:
RenderingManager,ServiceRepository
public class Renderer extends Object implements RenderingManager
-
-
Field Summary
Fields Modifier and Type Field Description static MethodDescriptorCLINIT_METHOD
-
Constructor Summary
Constructors Constructor Description Renderer(SourceWriter writer, Set<MethodReference> asyncMethods, Set<MethodReference> asyncFamilyMethods, Diagnostics diagnostics, RenderingContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getClassesInStats()ClassLoadergetClassLoader()intgetClassSize(String className)ListableClassReaderSourcegetClassSource()DebugInformationEmittergetDebugEmitter()intgetMetadataSize()NamingStrategygetNaming()PropertiesgetProperties()<T> TgetService(Class<T> type)intgetStringPoolSize()SourceWritergetWriter()booleanisLongLibraryUsed()booleanisMinifying()booleanisThreadLibraryUsed()voidprepare(List<PreparedClass> classes)booleanrender(List<PreparedClass> classes)voidrenderCompatibilityStubs()voidrenderLongRuntimeAliases()voidrenderStringConstants()voidrenderStringPool()voidsetDebugEmitter(DebugInformationEmitter debugEmitter)voidsetMinifying(boolean minifying)voidsetProgressConsumer(IntFunction<TeaVMProgressFeedback> progressConsumer)voidsetProperties(Properties properties)
-
-
-
Field Detail
-
CLINIT_METHOD
public static final MethodDescriptor CLINIT_METHOD
-
-
Constructor Detail
-
Renderer
public Renderer(SourceWriter writer, Set<MethodReference> asyncMethods, Set<MethodReference> asyncFamilyMethods, Diagnostics diagnostics, RenderingContext context)
-
-
Method Detail
-
isLongLibraryUsed
public boolean isLongLibraryUsed()
-
isThreadLibraryUsed
public boolean isThreadLibraryUsed()
-
getStringPoolSize
public int getStringPoolSize()
-
getMetadataSize
public int getMetadataSize()
-
getClassesInStats
public String[] getClassesInStats()
-
getClassSize
public int getClassSize(String className)
-
getWriter
public SourceWriter getWriter()
- Specified by:
getWriterin interfaceRenderingManager
-
getNaming
public NamingStrategy getNaming()
- Specified by:
getNamingin interfaceRenderingManager
-
isMinifying
public boolean isMinifying()
- Specified by:
isMinifyingin interfaceRenderingManager
-
setMinifying
public void setMinifying(boolean minifying)
-
getClassSource
public ListableClassReaderSource getClassSource()
- Specified by:
getClassSourcein interfaceRenderingManager
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceRenderingManager
-
getProperties
public Properties getProperties()
- Specified by:
getPropertiesin interfaceRenderingManager
-
getDebugEmitter
public DebugInformationEmitter getDebugEmitter()
-
setDebugEmitter
public void setDebugEmitter(DebugInformationEmitter debugEmitter)
-
setProgressConsumer
public void setProgressConsumer(IntFunction<TeaVMProgressFeedback> progressConsumer)
-
setProperties
public void setProperties(Properties properties)
-
renderStringPool
public void renderStringPool() throws RenderingException- Throws:
RenderingException
-
renderStringConstants
public void renderStringConstants() throws RenderingException- Throws:
RenderingException
-
renderCompatibilityStubs
public void renderCompatibilityStubs() throws RenderingException- Throws:
RenderingException
-
renderLongRuntimeAliases
public void renderLongRuntimeAliases() throws IOException- Throws:
IOException
-
prepare
public void prepare(List<PreparedClass> classes)
-
render
public boolean render(List<PreparedClass> classes) throws RenderingException
- Throws:
RenderingException
-
getService
public <T> T getService(Class<T> type)
- Specified by:
getServicein interfaceServiceRepository
-
-