public class EglTemplateFactory extends Object
Modifier and Type | Field and Description |
---|---|
protected IEglContext |
context |
protected URI |
root |
Constructor and Description |
---|
EglTemplateFactory() |
EglTemplateFactory(IEglContext context) |
Modifier and Type | Method and Description |
---|---|
protected EglTemplate |
createTemplate(EglTemplateSpecification spec)
Creates a template from the given specification.
|
IEglContext |
getContext() |
IncrementalitySettings |
getDefaultIncrementalitySettings() |
Collection<ITemplateExecutionListener> |
getTemplateExecutionListeners() |
String |
getTemplateRoot() |
void |
initialiseRoot(URI root)
Sets the root of this template factory, unless it has already been set.
|
protected EglTemplate |
load(EglTemplateSpecification spec)
Loads an EglTemplate from the given EglTemplateSpecification.
|
EglTemplate |
load(File file)
Loads an EglTemplate for the EGL code stored in the indicated file.
|
EglTemplate |
load(String path)
Loads an EglTemplate for the EGL code stored in the file at path.
|
protected EglTemplate |
load(String code,
File file)
Loads an EglTemplate for the given EGL code as though it were
contained in the given File.
|
protected EglTemplate |
load(String code,
URI resource)
Loads an EglTemplate for the given EGL code as though it were
contained in the given URI.
|
EglTemplate |
load(URI resource)
Loads an EglTemplate for the EGL code stored in the given resource.
|
protected String |
name(String path) |
EglTemplate |
prepare(String code)
Prepares an EGL template that will execute the given
EGL source code.
|
protected URI |
resolveRoot(String path) |
URI |
resolveTemplate(String path) |
void |
setContext(IEglContext context) |
void |
setDefaultFormatter(Formatter defaultFormatter) |
void |
setDefaultFormatters(Collection<Formatter> defaultFormatters) |
void |
setDefaultFormatters(Formatter... defaultFormatters) |
void |
setRoot(URI root) |
void |
setTemplateRoot(String path) |
String |
toString() |
protected IEglContext context
protected URI root
public EglTemplateFactory()
public EglTemplateFactory(IEglContext context)
public Collection<ITemplateExecutionListener> getTemplateExecutionListeners()
public IncrementalitySettings getDefaultIncrementalitySettings()
public void setDefaultFormatter(Formatter defaultFormatter)
public void setDefaultFormatters(Formatter... defaultFormatters)
public void setDefaultFormatters(Collection<Formatter> defaultFormatters)
public IEglContext getContext()
public void setContext(IEglContext context)
public void initialiseRoot(URI root)
public void setRoot(URI root)
public String getTemplateRoot()
public void setTemplateRoot(String path) throws EglRuntimeException
EglRuntimeException
protected URI resolveRoot(String path) throws EglRuntimeException
EglRuntimeException
public URI resolveTemplate(String path) throws EglRuntimeException
EglRuntimeException
public EglTemplate load(File file) throws EglRuntimeException
#createTemplate(String, URI)
, rather
than this method, unless they wish to alter the way in which a file is
transformed into an EglTemplateSpecificationEglRuntimeException
protected EglTemplate load(String code, File file) throws EglRuntimeException
#createTemplate(String, URI)
, rather
than this method, unless they wish to alter the way in which a dirty
resource is transformed into an EglTemplateSpecificationEglRuntimeException
public EglTemplate load(String path) throws EglRuntimeException
#createTemplate(String, URI)
, rather
than this method, unless they wish to alter the way in which a path is
transformed into an EglTemplateSpecificationEglRuntimeException
public EglTemplate load(URI resource) throws EglRuntimeException
#createTemplate(String, URI)
, rather
than this method, unless they wish to alter the way in which a resource is
transformed into an EglTemplateSpecificationEglRuntimeException
protected EglTemplate load(String code, URI resource) throws EglRuntimeException
#createTemplate(String, URI)
, rather
than this method, unless they wish to alter the way in which a dirty
resource is transformed into an EglTemplateSpecificationEglRuntimeException
protected EglTemplate load(EglTemplateSpecification spec) throws EglRuntimeException
#createTemplate(String, URI)
, rather
than this method, unless they wish to alter the way in which IOExceptions
are handled.EglRuntimeException
public EglTemplate prepare(String code) throws Exception
#createTemplate(String)
, rather than this method,
as this method may, in the future, acquire additional
responsibilities, such as exception handling.Exception
protected EglTemplate createTemplate(EglTemplateSpecification spec) throws Exception
Exception
Copyright © 2016. All rights reserved.