|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtools.tmpl.compiler.SimpleTemplate
public class SimpleTemplate
Field Summary | |
---|---|
protected String |
Extends
|
protected List<String> |
global
|
protected List<String> |
header
|
protected Set<String> |
Impl_Set
|
protected List<String> |
Implements
|
protected MacroManager |
macroManager
|
protected List<CompilerItem.MethodBody> |
methodBody
|
Constructor Summary | |
---|---|
SimpleTemplate(Compiler compiler,
String sourceFilename,
String templateClassname,
TmplLanguage tmplLanguage,
DestLanguage destLanguage,
SimpleInfoSupport support,
boolean omitOnIdent,
String includePath,
Collection<SimpleMacroDescriptor> macroDescriptors)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String Extends
protected final List<String> global
protected final List<String> header
protected final Set<String> Impl_Set
protected final List<String> Implements
protected MacroManager macroManager
protected final List<CompilerItem.MethodBody> methodBody
Constructor Detail |
---|
public SimpleTemplate(Compiler compiler, String sourceFilename, String templateClassname, TmplLanguage tmplLanguage, DestLanguage destLanguage, SimpleInfoSupport support, boolean omitOnIdent, String includePath, Collection<SimpleMacroDescriptor> macroDescriptors)
Method Detail |
---|
public void add(CompilerItem item) throws IOException, CompilerException
add
in interface MacroCallback
IOException
CompilerException
public void addCode(char[] comment, InfoSupport support) throws IOException, CompilerException
addCode
in interface ParserCallback
IOException
CompilerException
public void addComment(char[] comment, InfoSupport support) throws IOException, CompilerException
addComment
in interface ParserCallback
IOException
CompilerException
public void addExpression(char[] code, InfoSupport support) throws IOException, CompilerException
addExpression
in interface ParserCallback
IOException
CompilerException
public void addGlobalCode(String x) throws CompilerException
addGlobalCode
in interface CompilerItemCallback
CompilerException
public void addHeaderCode(String x) throws CompilerException
addHeaderCode
in interface CompilerItemCallback
CompilerException
public void addImage(char[] image, InfoSupport support) throws IOException, CompilerException
addImage
in interface ParserCallback
IOException
CompilerException
public boolean addImplements(String classname) throws CompilerException
addImplements
in interface CompilerItemCallback
CompilerException
public void addLinebreak(InfoSupport support) throws IOException, CompilerException
addLinebreak
in interface ParserCallback
IOException
CompilerException
public void addMacro(Macro macro)
public void addMacro(Macro macro, String groupName, String groupClass)
public void addMacro(Macro macro, String macroName, String macroClass, String groupName, String groupClass)
public void addMacro(SimpleMacroDescriptor macro, InfoSupport support)
public int addMacros(MacroLib macroSet)
public int addMacros(MacroLib macrog, String groupName, String groupClass)
addMacros
in interface Template
public boolean addMethodBody(CompilerItem.MethodBody.MBBegin x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public boolean addMethodBody(CompilerItem.MethodBody.MBCode x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public boolean addMethodBody(CompilerItem.MethodBody.MBComment x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public boolean addMethodBody(CompilerItem.MethodBody.MBEnd x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public boolean addMethodBody(CompilerItem.MethodBody.MBExpression x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public boolean addMethodBody(CompilerItem.MethodBody.MBImage x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public boolean addMethodBody(CompilerItem.MethodBody.MBLinebreak x) throws CompilerException
addMethodBody
in interface CompilerItemCallback
CompilerException
public void addStatement(Parser parser, char[][] statementlines, Collection<StatementReader.Factory> readerfactory, InfoSupport support) throws IOException, CompilerException
addStatement
in interface ParserCallback
IOException
CompilerException
public PrintStreamOutput.Result compile(PrintStreamOutput out) throws IOException, CompilerException
compile
in interface Template
IOException
CompilerException
public Parser createParser()
public int decSkipLevel() throws CompilerException
decSkipLevel
in interface Template
CompilerException
protected void execute(CompilerItem item) throws IOException, CompilerException
IOException
CompilerException
public Macro findMacro(MacroIdentifier macroID, ArgumentValues arguments, InfoSupport support) throws CompilerException
findMacro
in interface CompilerItemCallback
CompilerException
public Compiler getCompiler()
Template
getCompiler
in interface Template
protected ParserFactory getDefaultParserFactory()
public DestLanguage getDestLanguage()
Template
getDestLanguage
in interface Template
public Map<Object,Object> getFeatures()
Template
getFeatures
in interface Template
public String getIncludePath()
getIncludePath
in interface Template
public String getParserTarget()
public Properties getProperties()
Template
getProperties
in interface Template
public InfoPublisher getPublisher()
Template
getPublisher
in interface Template
public String getSourceFilename()
Template
getSourceFilename
in interface Template
public InfoSupport getSupport()
getSupport
in interface Template
public Template getTemplate()
getTemplate
in interface CompilerItemCallback
public String getTemplateClassname()
Template
getTemplateClassname
in interface Template
public TmplLanguage getTmplLanguage()
Template
getTmplLanguage
in interface Template
protected Collection<URL> getUrlIncludePath()
public int incSkipLevel() throws CompilerException
Template
incSkipLevel
in interface Template
CompilerException
public boolean isOmitOnIdent()
isOmitOnIdent
in interface Template
public boolean isSkip()
Template
isSkip
in interface Template
protected void load(String FileName, boolean useIncludePath) throws IOException, CompilerException
IOException
CompilerException
protected void load(String FileName, InputStream input) throws IOException, CompilerException
IOException
CompilerException
public void load(String FileName, CompilerItem.IncludeItem parent) throws IOException, CompilerException
load
in interface CompilerItemCallback
IOException
CompilerException
protected InputStream open(String filename, boolean useIncludePath) throws IOException
IOException
public boolean setExtends(String classname) throws CompilerException
setExtends
in interface CompilerItemCallback
CompilerException
public void setIncludePath(String path)
Template
setIncludePath
in interface Template
path
- The include path.public void setOmitOnIdent(boolean onOff)
Template
setOmitOnIdent
in interface Template
onOff
- True to switch omit on ident on, false to set it off.public void setParserFactory(ParserFactory parserFactory)
setParserFactory
in interface Template
public void setParserTarget(String target)
public void setProperties(Properties properties)
setProperties
in interface Template
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |