Interface FieldLink
- All Superinterfaces:
Identifiable,Link,Stringifiable,WithModifiers,WithName,WithType
- All Known Implementing Classes:
BasicFieldLink
An interface used to simply access fields.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Tget()Returns the object assigned to the type of this field.<T> TReturns the object assigned to the given instance.default Link.Kindkind()default Fieldlink()Deprecated.use reflection() insteaddefault intReturn the bit representation of the modifiers of this link.Returns the type of the field linked by this field link.voidSets the object assigned to the type of this field.voidSets the object assigned to the given instance.default TypeLinktype()Returns the type of this link.Methods inherited from interface org.tudalgo.algoutils.tutor.general.match.Identifiable
stringMethods inherited from interface org.tudalgo.algoutils.tutor.general.reflections.WithName
identifier, name
-
Method Details
-
get
<T> T get()Returns the object assigned to the type of this field.
This field is required to be an class field.
- Returns:
- the object
-
get
Returns the object assigned to the given instance.
This field is required to be an instance field.
- Parameters:
instance- the instance- Returns:
- the object
-
link
Deprecated.use reflection() instead -
reflection
Field reflection()Returns the type of the field linked by this field link.
- Specified by:
reflectionin interfaceLink- Returns:
- the type
-
set
Sets the object assigned to the type of this field.
This field is required to be an class field.
- Parameters:
object- the object
-
set
Sets the object assigned to the given instance.
This field is required to be an instance field.
- Parameters:
instance- the instanceobject- the object
-
kind
-
modifiers
default int modifiers()Description copied from interface:WithModifiersReturn the bit representation of the modifiers of this link.
- Specified by:
modifiersin interfaceWithModifiers- Returns:
- the modifiers
-
staticType
TypeLink staticType() -
type
Description copied from interface:WithTypeReturns the type of this link.
-