| 构造器和说明 |
|---|
StringSource(String content,
boolean cache)
构造 StringSource
|
StringSource(StringBuilder content,
boolean cache) |
StringSource(StringBuilder content,
String cacheKey) |
StringSource(String content,
String cacheKey)
构造 StringSource
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getCacheKey()
cache key used to cache, return null if do not cache the template
注意:如果不希望缓存从该 ISource 解析出来的 Template 对象
让 getCacheKey() 返回 null 值即可
|
StringBuilder |
getContent()
content of ISource
|
String |
getEncoding()
encoding of content
|
boolean |
isModified()
reload template if modified on devMode
|
String |
toString() |
public StringSource(String content, boolean cache)
content - 模板内容cache - true 则缓存 Template,否则不缓存public StringSource(String content, String cacheKey)
content - 模板内容cacheKey - 缓存 Template 使用的 key,值为 null 时不缓存public StringSource(StringBuilder content, boolean cache)
public StringSource(StringBuilder content, String cacheKey)
public boolean isModified()
ISourceisModified 在接口中 ISourcepublic String getCacheKey()
ISourcegetCacheKey 在接口中 ISourcepublic StringBuilder getContent()
ISourcegetContent 在接口中 ISourcepublic String getEncoding()
ISourcegetEncoding 在接口中 ISourceCopyright © 2024. All rights reserved.