Skip to content

AnnotationValues

final class AnnotationValues
Package: dev.joid.lib.utils.annotation · Module: core · Source: AnnotationValues.java

Copies the values of an annotation into the object that holds the same options, through its setters.

A UI reads its @UIData... annotations into their *Object classes with it. For each attribute of the annotation, the target needs a public method of the same name that takes the value; a nested annotation goes to the object that the method without argument returns.

ReturnsSignatureSummary
Tread(Annotation annotation, T target) staticSets every attribute of the annotation on the target and returns it; a null annotation leaves the target unchanged.
Tmerge(T target, Annotation previous, Annotation next) staticSets on the target only the attributes whose value differs between the previous and the next annotation, so that a change made at run time on an attribute that the annotation did not change is kept.

<T> T read(Annotation annotation, T target) static

Sets every attribute of the annotation on the target and returns it; a null annotation leaves the target unchanged. Throws an IllegalStateException when the target has no method for an attribute, or when that method fails.

<T> T merge(T target, Annotation previous, Annotation next) static

Sets on the target only the attributes whose value differs between the previous and the next annotation, so that a change made at run time on an attribute that the annotation did not change is kept. A null annotation stands for the default values; it throws an IllegalStateException like read.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page