In package com.eden.orchid.api.compilers

class com.eden.orchid.api.compilers.CompilerService

Handles the conversion of source content from one language or format to another. Specific OrchidCompilers or OrchidParsers can be added seamlessly by injecting into the appropriate set in your Module.

Methods

public open getIgnoredOutputExtensions(): MutableList

Normally, a filename like index.php.peb would be read as being compiled with the peb extension, but instead of rendering to the normal html output extension, use php. However, for a filename file index.min.js, the min should be ignored from this process and kept in the filename, as it is a common convention to use min.js to denote a compiled/minified Javascript asset. This method returns a List of the current known ignored output extensions

Parameters:
  • No parameters
public open getOutputExtension(kotlin.String): String

For a given input extension, determine the language it will become after it has been compiled

Parameters:
  • extension: String
public open compilerFor(kotlin.String): com.eden.orchid.api.compilers.OrchidCompiler

Finds an OrchidCompiler capable of evaluating input with a given file extension.

Parameters:
  • extension: String
public open parse(kotlin.String, kotlin.String): MutableMap

Compiles input against a given Parser identified by file extension.

Parameters:
  • extension: String
  • input: String
public open isBinaryExtension(kotlin.String): Boolean

Determines if a given file extension is known to require processing as a binary stream rather than an encoded String.

Parameters:
  • extension: String
public open parserFor(kotlin.String): com.eden.orchid.api.compilers.OrchidParser

Finds an OrchidParser capable of evaluating input with a given file extension.

Parameters:
  • extension: String
public open isIgnoredOutputExtension(kotlin.String): Boolean

Determines if a given file extension should be ignored when considering 'intermediate' dots in a filename.

Parameters:
  • extension: String
public open getEmbeddedData(kotlin.String, kotlin.String): EdenPair

Extract the data embedded within some given content, returning the data that was extracted as well as the content after the embedded data has been removed.

Parameters:
  • extension: String
  • input: String
public open getParserExtensions(): MutableSet

Get the file extensions that can be converted using the registered OrchidParsers.

Parameters:
  • No parameters
public open compile(kotlin.String, kotlin.String): String

Compiles input against a given Compiler identified by file extension. Additional data may be passed in that individual Compilers may use to render into the resulting output.

Parameters:
  • extension: String
  • input: String
public open compile(kotlin.String, kotlin.String, kotlin.Any): String

Compiles input against a given Compiler identified by file extension. Additional data may be passed in that individual Compilers may use to render into the resulting output.

Parameters:
  • extension: String
  • input: String
  • data: Any
public open getCompilerExtensions(): MutableSet

Get the file extensions that can be converted using the registered OrchidCompilers.

Parameters:
  • No parameters
public open getBinaryExtensions(): MutableList

Many file types need to be processed and rendered as a binary stream rather than being decoded into a String. This method returns a List of the current known binary file extensions, so it can be determined how to process a given file type.

Parameters:
  • No parameters
public open serialize(kotlin.String, kotlin.Any): String

Compiles input against a given Parser identified by file extension.

Parameters:
  • extension: String
  • input: Any
public open getDefaultPrecompilerExtension(): String

Get the file extension that is used by default by the Precompiler.

Parameters:
  • No parameters