Package org.apache.sling.scripting.api

# Class AbstractScriptEngineFactory

java.lang.Object
org.apache.sling.scripting.api.AbstractScriptEngineFactory

All Implemented Interfaces:
  `ScriptEngineFactory`

public abstract class AbstractScriptEngineFactory extends Object implements ScriptEngineFactory
This abstract class can be used for own script engine factory implementations.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractScriptEngineFactory()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getEngineName()`
`String`
`getEngineVersion()`
`List<String>`
`getExtensions()`
`String`
`getMethodCallSyntax(String obj, String m, String... args)`
`List<String>`
`getMimeTypes()`
`List<String>`
`getNames()`
`String`
`getOutputStatement(String value)`
`Object`
`getParameter(String name)`
`String`
`getProgram(String... arg0)`
`protected void`
`setEngineName(String engineName)`
Set the engine name.
`protected void`
`setEngineVersion(String engineVersion)`
Set the engine version
`protected void`
`setExtensions(String... extensions)`
Set the extensions
`protected void`
`setMimeTypes(String... mimeTypes)`
Set the mime types
`protected void`
`setNames(String... names)`
Set the names

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

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

### Methods inherited from interface javax.script.ScriptEngineFactory

`getLanguageName, getLanguageVersion, getScriptEngine`

## Constructor Details

### AbstractScriptEngineFactory

protected AbstractScriptEngineFactory()

## Method Details

### getEngineName

public String getEngineName()

Specified by:
  `getEngineName` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getEngineName()`

### setEngineName

protected void setEngineName(String engineName)
Set the engine name.

Parameters:
  `engineName` - The new engine name

### getEngineVersion

public String getEngineVersion()

Specified by:
  `getEngineVersion` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getEngineVersion()`

### setEngineVersion

protected void setEngineVersion(String engineVersion)
Set the engine version

Parameters:
  `engineVersion` - The version string

### getExtensions

public List<String> getExtensions()

Specified by:
  `getExtensions` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getExtensions()`

### setExtensions

protected void setExtensions(String... extensions)
Set the extensions

Parameters:
  `extensions` - The array of extensions

### getMimeTypes

public List<String> getMimeTypes()

Specified by:
  `getMimeTypes` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getMimeTypes()`

### setMimeTypes

protected void setMimeTypes(String... mimeTypes)
Set the mime types

Parameters:
  `mimeTypes` - The array of mime types

### getNames

public List<String> getNames()

Specified by:
  `getNames` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getNames()`

### setNames

protected void setNames(String... names)
Set the names

Parameters:
  `names` - The array of names.

### getMethodCallSyntax

public String getMethodCallSyntax(String obj, String m, String... args)

Specified by:
  `getMethodCallSyntax` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getMethodCallSyntax(java.lang.String, java.lang.String, java.lang.String[])`

### getOutputStatement

public String getOutputStatement(String value)

Specified by:
  `getOutputStatement` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getOutputStatement(java.lang.String)`

### getParameter

public Object getParameter(String name)

Specified by:
  `getParameter` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getParameter(java.lang.String)`

### getProgram

public String getProgram(String... arg0)

Specified by:
  `getProgram` in interface `ScriptEngineFactory`
See Also:
  - `ScriptEngineFactory.getProgram(java.lang.String[])`