public class GetAttributeMethod extends java.lang.Object implements EntityMethod
GetAttribute
,
GetAttributeFunction
Constructor and Description |
---|
GetAttributeMethod(NamedAttributeType<java.lang.Object> namedType,
boolean primitive,
boolean optional)
Creates a new get attribute method.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Gets the attribute name.
|
NamedAttributeType<java.lang.Object> |
getNamedType()
Gets the named attribute type.
|
AttributeType<?> |
getType()
Gets the attribute type.
|
java.lang.Object |
invoke(java.lang.Object proxy,
Entity entity,
java.lang.Object[] args)
This will invoke the desired functionality for this method using the proxy, entity and
supplied arguments.
|
boolean |
isOptional()
Whether the optional equivelent will be used.
|
boolean |
isPrimitive()
Whether this is a primitive conversion.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDependencies
public GetAttributeMethod(NamedAttributeType<java.lang.Object> namedType, boolean primitive, boolean optional)
namedType
- Named attribute type.optional
- Optional return type.public java.lang.String getName()
public NamedAttributeType<java.lang.Object> getNamedType()
public AttributeType<?> getType()
public java.lang.Object invoke(java.lang.Object proxy, Entity entity, java.lang.Object[] args) throws java.lang.Throwable
EntityMethod
invoke
in interface EntityMethod
proxy
- Possible proxy of entity type.entity
- Entity this proxy is for.args
- Supplied arguments to the original method.java.lang.Throwable
- If the invocation caused an exception.public boolean isOptional()
opt
method.public boolean isPrimitive()