public class EngineConfig extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_ENCODING |
| 构造器和说明 |
|---|
EngineConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addDirective(String directiveName,
Class<? extends Directive> directiveClass) |
void |
addDirective(String directiveName,
Class<? extends Directive> directiveClass,
boolean keepLineBlank) |
void |
addDirective(String directiveName,
DirectiveFactory directiveFactory) |
void |
addDirective(String directiveName,
DirectiveFactory directiveFactory,
boolean keepLineBlank) |
void |
addSharedFunction(ISource source)
Add shared function by ISource
|
void |
addSharedFunction(String... fileNames)
Add shared function with files
|
void |
addSharedFunction(String fileName)
Add shared function with file
|
void |
addSharedFunctionByString(String content)
Add shared function by string content
|
void |
addSharedMethod(Class<?> sharedMethodFromClass)
Add shared method from class
|
void |
addSharedMethod(Object sharedMethodFromObject)
Add shared method from object
|
void |
addSharedObject(String name,
Object object) |
void |
addSharedStaticMethod(Class<?> sharedStaticMethodFromClass)
Add shared static method of Class
|
String |
getBaseTemplatePath() |
Compressor |
getCompressor() |
String |
getDatePattern() |
DirectiveFactory |
getDirective(String directiveName) |
String |
getEncoding() |
Set<String> |
getKeepLineBlankDirectives() |
Output |
getOutputDirective(ExprList exprList,
Location location) |
RoundingMode |
getRoundingMode() |
SharedMethodKit |
getSharedMethodKit() |
Map<String,Object> |
getSharedObjectMap() |
ISourceFactory |
getSourceFactory() |
boolean |
isDevMode() |
boolean |
isStaticFieldExpressionEnabled() |
boolean |
isStaticMethodExpressionEnabled() |
void |
removeDirective(String directiveName) |
void |
removeSharedMethod(Class<?> sharedClass)
Remove shared Method of the Class
|
void |
removeSharedMethod(Method method)
Remove shared Method
|
void |
removeSharedMethod(String methodName)
Remove shared Method with method name
|
void |
removeSharedMethod(String methodName,
Class<?>... paraTypes)
Remove shared Method
|
void |
removeSharedObject(String name) |
void |
setBaseTemplatePath(String baseTemplatePath) |
void |
setBufferSize(int bufferSize) |
void |
setCompressor(Compressor compressor) |
void |
setDatePattern(String datePattern) |
void |
setEncoderFactory(EncoderFactory encoderFactory) |
void |
setEncoding(String encoding) |
void |
setKeepLineBlank(String directiveName,
boolean keepLineBlank) |
void |
setOutputDirectiveFactory(OutputDirectiveFactory outputDirectiveFactory)
Set output directive factory
|
void |
setReentrantBufferSize(int reentrantBufferSize) |
void |
setReloadModifiedSharedFunctionInDevMode(boolean reloadModifiedSharedFunctionInDevMode) |
void |
setRoundingMode(RoundingMode roundingMode)
设置 #number 指令与 Arith 中浮点数的舍入规则,默认为 RoundingMode.HALF_UP "四舍五入"
|
void |
setStaticFieldExpression(boolean enable)
设置为 true 支持静态属性访问表达式,自 jfinal 5.0.2 版本开始默认值为 false
|
void |
setStaticMethodExpression(boolean enable)
设置为 true 支持静态方法调用表达式,自 jfinal 5.0.2 版本开始默认值为 false
|
void |
setWriterBuffer(WriterBuffer writerBuffer)
配置自己的 WriterBuffer 实现,配置方法:
engine.getEngineConfig().setWriterBuffer(
|
public void addSharedFunction(String fileName)
public void addSharedFunction(String... fileNames)
public void addSharedFunctionByString(String content)
public void addSharedFunction(ISource source)
public void removeSharedObject(String name)
public void setOutputDirectiveFactory(OutputDirectiveFactory outputDirectiveFactory)
public boolean isDevMode()
public ISourceFactory getSourceFactory()
public void setBaseTemplatePath(String baseTemplatePath)
public String getBaseTemplatePath()
public void setEncoding(String encoding)
public void setEncoderFactory(EncoderFactory encoderFactory)
public void setBufferSize(int bufferSize)
public void setReentrantBufferSize(int reentrantBufferSize)
public void setWriterBuffer(WriterBuffer writerBuffer)
public String getEncoding()
public void setDatePattern(String datePattern)
public String getDatePattern()
public void setReloadModifiedSharedFunctionInDevMode(boolean reloadModifiedSharedFunctionInDevMode)
public void addDirective(String directiveName, DirectiveFactory directiveFactory, boolean keepLineBlank)
public void addDirective(String directiveName, Class<? extends Directive> directiveClass, boolean keepLineBlank)
public void addDirective(String directiveName, DirectiveFactory directiveFactory)
public void addDirective(String directiveName, Class<? extends Directive> directiveClass)
public DirectiveFactory getDirective(String directiveName)
public void removeDirective(String directiveName)
public void setKeepLineBlank(String directiveName, boolean keepLineBlank)
public void addSharedMethod(Object sharedMethodFromObject)
public void addSharedMethod(Class<?> sharedMethodFromClass)
public void addSharedStaticMethod(Class<?> sharedStaticMethodFromClass)
public void removeSharedMethod(String methodName)
public void removeSharedMethod(Class<?> sharedClass)
public void removeSharedMethod(Method method)
public void removeSharedMethod(String methodName, Class<?>... paraTypes)
public SharedMethodKit getSharedMethodKit()
public void setCompressor(Compressor compressor)
public Compressor getCompressor()
public void setRoundingMode(RoundingMode roundingMode)
public RoundingMode getRoundingMode()
public void setStaticMethodExpression(boolean enable)
public boolean isStaticMethodExpressionEnabled()
public void setStaticFieldExpression(boolean enable)
public boolean isStaticFieldExpressionEnabled()
Copyright © 2024. All rights reserved.