Package org.apache.sling.scripting.sightly.java.compiler

## Class JavaClassBackendCompiler

- java.lang.Object
- - org.apache.sling.scripting.sightly.java.compiler.JavaClassBackendCompiler

All Implemented Interfaces:
  `org.apache.sling.scripting.sightly.compiler.backend.BackendCompiler`

    public final class JavaClassBackendCompiler
    extends Object
    implements org.apache.sling.scripting.sightly.compiler.backend.BackendCompiler

`BackendCompiler` that generates a Java class.

### Constructor Summary

Constructors
`JavaClassBackendCompiler()`
`JavaClassBackendCompiler​(JavaImportsAnalyzer javaImportsAnalyzer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `build​(ClassInfo classInfo)` Provided the class information, this method will build the source code for the generated Java class.
`void` `handle​(org.apache.sling.scripting.sightly.compiler.commands.CommandStream stream)`

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

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

### Constructor Detail

#### JavaClassBackendCompiler

    public JavaClassBackendCompiler()

#### JavaClassBackendCompiler

    public JavaClassBackendCompiler​(JavaImportsAnalyzer javaImportsAnalyzer)

### Method Detail

#### handle

    public void handle​(org.apache.sling.scripting.sightly.compiler.commands.CommandStream stream)

Specified by:
  `handle` in interface `org.apache.sling.scripting.sightly.compiler.backend.BackendCompiler`

#### build

    public String build​(ClassInfo classInfo)

Provided the class information, this method will build the source code for the generated Java class.

Parameters:
  `classInfo` - the class information
Returns:
  the generated Java class' source code