public class GetAttributeFunction extends java.lang.Object implements EntityMethodFunction
GetAttribute annotation. It will resolve an
GetAttributeMethod to be used by the entity typing system.AttributeContainer.getAttribute(String, jalse.attributes.AttributeType) supplied with the
name scary and type Boolean.
@GetAttribute(name = "scary")
Boolean isScary();
@GetAttribute
Boolean isScary();
The next example signatures will resolve to
AttributeContainer.getOptAttribute(String, jalse.attributes.AttributeType) supplied with
the name scary and type Boolean.
@GetAttribute(name = "scary")
Optional <Boolean> isScary();
@GetAttribute
Optional <Boolean> isScary();
NOTE: This function will throw exceptions if GetAttribute is present but the method
signature is invalid.DefaultEntityProxyFactory| Constructor and Description |
|---|
GetAttributeFunction() |
| Modifier and Type | Method and Description |
|---|---|
GetAttributeMethod |
apply(java.lang.reflect.Method m) |
public GetAttributeMethod apply(java.lang.reflect.Method m)
apply in interface java.util.function.Function<java.lang.reflect.Method,EntityMethod>