On this page
[Java] Class CachedField
- org.codehaus.groovy.reflection.CachedField
public class CachedField
extends MetaProperty
Fields inherited from class | Fields |
---|---|
class MetaProperty |
PROPERTY_SET_PREFIX, name, type |
Constructor Summary
Constructor and description |
---|
CachedField(Field field) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public Field |
getCachedField() |
|
public Class |
getDeclaringClass() |
|
public int |
getModifiers() |
|
public Object |
getProperty(Object object)
|
|
public boolean |
isFinal() |
|
public boolean |
isStatic() |
|
public void |
setProperty(Object object, Object newValue) Sets the property on the given object to the new value |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class MetaProperty |
getGetterName, getModifiers, getName, getProperty, getSetterName, getType, setProperty |
Constructor Detail
public CachedField(Field field)
Method Detail
public Field getCachedField()
public Class getDeclaringClass()
@Override public int getModifiers()
@Override public Object getProperty(Object object)
- throws:
- RuntimeException if the property could not be evaluated
- Returns:
- the property of the given object
public boolean isFinal()
public boolean isStatic()
@Override public void setProperty(Object object, Object newValue)
Sets the property on the given object to the new value
- throws:
- RuntimeException if the property could not be set
- Parameters:
object
- on which to set the propertynewValue
- the new value of the property
© 2003-2022 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/4.0.0/html/gapi/org/codehaus/groovy/reflection/CachedField.html