Package eu.mihosoft.vmf.core
Annotation Type DefaultValue
-
@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface DefaultValue
This model annotation allows to define custom default values for properties.Example Model:
package mypkg.vmfmodel; import eu.mihosoft.vmf.core.*; interface ObjectWithDefaultValues { @DefaultValue(value="23") Integer getValue(); @DefaultValue(value="\"my name\"") String getName(); }
Additional Notes:
Default values are also responsible for defining whether a value is set or unset. Usually, properties have the default valuenull
. It is set if it is notnull
and unset if it isnull
. If the default value is different fromnull
it is unset if it is equal to the custom default value and set if it is not equal to the custom default value.Created by miho on 18.06.2018.
- See Also:
- Custom Default Values for Properties
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
value
-