Package org.apache.sling.scripting.sightly.impl.engine.compiled

# Class SlingHTLMasterCompiler

java.lang.Object
org.apache.sling.scripting.sightly.impl.engine.compiled.SlingHTLMasterCompiler

public class SlingHTLMasterCompiler extends Object

## Constructor Summary

Constructors
Constructor
Description
`SlingHTLMasterCompiler()`

## Method Summary

Modifier and Type
Method
Description
`SightlyCompiledScript`
`compileHTLScript(SightlyScriptEngine engine, Reader script, ScriptContext scriptContext)`
`ClassLoader`
`getClassLoader()`
`Object`
`getResourceBackedUseObject(org.apache.sling.scripting.sightly.render.RenderContext renderContext, String className)`
This method returns an Object instance based on a `Resource`-backed class that is either found through regular classloading mechanisms or on-the-fly compilation.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SlingHTLMasterCompiler

public SlingHTLMasterCompiler()

## Method Details

### getResourceBackedUseObject

public Object getResourceBackedUseObject(org.apache.sling.scripting.sightly.render.RenderContext renderContext, String className)
This method returns an Object instance based on a `Resource`-backed class that is either found through regular classloading mechanisms or on-the-fly compilation. In case the requested class does not denote a fully qualified class name, this service will try to find the class through Sling's resource resolution mechanism and compile the class on-the-fly if required.

Parameters:
  `renderContext` - the render context
  `className` - name of class to use for object instantiation
Returns:
  object instance of the requested class or `null` if the specified class is not backed by a `Resource`

### compileHTLScript

public SightlyCompiledScript compileHTLScript(SightlyScriptEngine engine, Reader script, ScriptContext scriptContext) throws ScriptException

Throws:
  `ScriptException`

### getClassLoader

public ClassLoader getClassLoader()