public class EnhanceContext<T,Slf extends EnhanceContext> extends Object implements Function<String,Object>, TypeGuidance, PropertiesGuidance, ReturnGuidance
| Type | Property and Description |
|---|---|
boolean |
allowTextAs
允许文本作为属性表达式用
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isMap |
protected T |
target |
| Constructor and Description |
|---|
EnhanceContext(T target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowPropertyDefault()
允许属性默认值
|
boolean |
allowPropertyNesting()
允许属性嵌套
|
boolean |
allowReturnNull()
允许返回 null
|
boolean |
allowTextAsProperty()
允许文本作为属性表达式用
|
Object |
apply(String name) |
Slf |
forAllowPropertyDefault(boolean allowPropertyDefault) |
Slf |
forAllowPropertyNesting(boolean allowPropertyNesting) |
Slf |
forAllowReturnNull(boolean allowReturnNull) |
Slf |
forAllowTextAsProperty(boolean allowTextAsProperty) |
Slf |
forProperties(Properties properties) |
Slf |
forTypeGuidance(TypeGuidance typeGuidance) |
Properties |
getProperties()
获取属性
|
T |
getTarget() |
Class<?> |
getType(String typeName)
获取类型
|
TypeGuidance |
getTypeGuidance() |
public boolean allowTextAsProperty
allowTextAsProperty in interface PropertiesGuidanceprotected final T target
protected final boolean isMap
public EnhanceContext(T target)
public Slf forProperties(Properties properties)
public Slf forAllowPropertyDefault(boolean allowPropertyDefault)
public Slf forAllowPropertyNesting(boolean allowPropertyNesting)
public Slf forAllowTextAsProperty(boolean allowTextAsProperty)
public Slf forAllowReturnNull(boolean allowReturnNull)
public Slf forTypeGuidance(TypeGuidance typeGuidance)
public Class<?> getType(String typeName) throws EvaluationException
TypeGuidancegetType in interface TypeGuidanceEvaluationExceptionpublic T getTarget()
public TypeGuidance getTypeGuidance()
public Properties getProperties()
PropertiesGuidancegetProperties in interface PropertiesGuidancepublic boolean allowPropertyDefault()
PropertiesGuidanceallowPropertyDefault in interface PropertiesGuidancepublic boolean allowPropertyNesting()
PropertiesGuidanceallowPropertyNesting in interface PropertiesGuidancepublic boolean allowTextAsProperty()
PropertiesGuidanceallowTextAsProperty in interface PropertiesGuidancepublic boolean allowReturnNull()
ReturnGuidanceallowReturnNull in interface ReturnGuidanceCopyright © 2025. All rights reserved.