Constructor and Description |
---|
StringSource(String content,
boolean cache)
构造 StringSource
|
StringSource(StringBuilder content,
boolean cache) |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
getContent()
content of ISource
|
String |
getEncoding()
encoding of content
|
String |
getKey()
key used to cache, return null if do not cache the template
注意:如果不希望缓存从该 ISource 解析出来的 Template 对象
让 getKey() 返回 null 值即可
|
boolean |
isModified()
reload template if modified on devMode
|
String |
toString() |
public StringSource(String content, boolean cache)
content
- 模板内容cache
- true 则缓存 Template,否则不缓存public StringSource(StringBuilder content, boolean cache)
public boolean isModified()
ISource
isModified
in interface ISource
public String getKey()
ISource
public StringBuilder getContent()
ISource
getContent
in interface ISource
public String getEncoding()
ISource
getEncoding
in interface ISource
Copyright © 2018. All rights reserved.