public class SetAttributeFunction extends java.lang.Object implements EntityMethodFunction
SetAttribute annotation. It will resolve an
SetAttributeMethod to be used by the entity typing system.AttributeContainer.setAttribute(String, jalse.attributes.AttributeType, Object) supplied
with the name scary, type Boolean and the specified input.
@SetAttribute(name = "scary")
Boolean setScary(Boolean scary);
@SetAttribute
void setScary(Boolean scary);
The next example signature will resolve to
AttributeContainer.setOptAttribute(String, jalse.attributes.AttributeType, Object)
supplied with the name scary, type Boolean and the specified input.
@SetAttribute(name = "scary")
Optional <Boolean> setScary(Boolean scary);
When null is supplied as an input to the above signatures it will be translated to
AttributeContainer.removeAttribute(String, jalse.attributes.AttributeType). SetAttribute is present but the method
signature is invalid.DefaultEntityProxyFactory| Constructor and Description |
|---|
SetAttributeFunction() |
| Modifier and Type | Method and Description |
|---|---|
SetAttributeMethod |
apply(java.lang.reflect.Method m) |
public SetAttributeMethod apply(java.lang.reflect.Method m)
apply in interface java.util.function.Function<java.lang.reflect.Method,EntityMethod>