Class RandomProperty
java.lang.Object
org.tquadrat.foundation.config.ap.impl.specialprops.SpecialPropertySpecBase
org.tquadrat.foundation.config.ap.impl.specialprops.RandomProperty
- All Implemented Interfaces:
SpecialPropertySpec
,PropertySpec
@ClassVersion(sourceVersion="$Id: RandomProperty.java 1061 2023-09-25 16:32:43Z tquadrat $")
@API(status=STABLE,
since="0.1.0")
public final class RandomProperty
extends SpecialPropertySpecBase
The implementation of
SpecialPropertySpecBase
for
SpecialPropertyType.CONFIG_PROPERTY_RANDOM
.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: RandomProperty.java 1061 2023-09-25 16:32:43Z tquadrat $
- Since:
- 0.1.0
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.config.ap.impl.specialprops.RandomProperty"
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.tquadrat.foundation.config.ap.PropertySpec
PropertySpec.PropertyFlag
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final CodeBlock
composeConstructorFragment
(CodeBuilder codeBuilder, PropertySpecImpl property) Composes the constructor fragment for the initialisation of this property.private static FieldSpec
composeField
(CodeBuilder codeBuilder, PropertySpecImpl property) The method that composes a field for the 'random' property.Returns the CLI value handler class for this property.Returns the method that composes the constructor fragment for the initialisation of the property.Returns the method that composes the field for the property.Returns thePreferences
accessor class.final TypeName
Returns the property type.Returns the class that implements the String converter for the type of this property.Methods inherited from class org.tquadrat.foundation.config.ap.impl.specialprops.SpecialPropertySpecBase
createAddMethod, createConstructorFragment, createField, createGetter, createSetter, getAddMethodArgumentName, getAddMethodComposer, getAddMethodName, getAllFlags, getCLIArgumentIndex, getCLIFormat, getCLIMetaVar, getCLIOptionNames, getCLIUsage, getCLIUsageKey, getCollectionKind, getEnvironmentDefaultValue, getEnvironmentVariableName, getGetterBuilder, getGetterComposer, getGetterMethodName, getGetterReturnType, getINIComment, getINIGroup, getINIKey, getPrefsKey, getPropertyName, getSetterArgumentName, getSetterBuilder, getSetterComposer, getSetterMethodName, getSpecialPropertyType, getSystemPrefsPath, getSystemPropertyName, hasFlag, isEnum, merge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tquadrat.foundation.config.ap.PropertySpec
getElementType, getFieldName, isCollection, isOnCLI
-
Constructor Details
-
RandomProperty
public RandomProperty()Creates a new instance ofRandomProperty
.
-
-
Method Details
-
composeConstructorFragment
private static final CodeBlock composeConstructorFragment(CodeBuilder codeBuilder, PropertySpecImpl property) Composes the constructor fragment for the initialisation of this property.- Parameters:
codeBuilder
- The factory for the code generation.property
- The property.- Returns:
- The field specification.
-
composeField
The method that composes a field for the 'random' property.- Parameters:
codeBuilder
- The factory for the code generation.property
- The property.- Returns:
- The field specification.
-
getCLIValueHandlerClass
Returns the CLI value handler class for this property. -
getConstructorFragmentComposer
public final Optional<BiFunction<CodeBuilder,PropertySpecImpl, getConstructorFragmentComposer()CodeBlock>> Returns the method that composes the constructor fragment for the initialisation of the property.- Specified by:
getConstructorFragmentComposer
in interfaceSpecialPropertySpec
- Overrides:
getConstructorFragmentComposer
in classSpecialPropertySpecBase
- Returns:
- An instance of
Optional
that holds the composer for the constructor fragment.
-
getFieldComposer
Returns the method that composes the field for the property.- Specified by:
getFieldComposer
in interfaceSpecialPropertySpec
- Overrides:
getFieldComposer
in classSpecialPropertySpecBase
- Returns:
- An instance of
Optional
that holds the field composer.
-
getPrefsAccessorClass
Returns the
Preferences
accessor class.This is used when this property is linked to a preference, but also to initialise it from a SYSTEM preference.
-
getPropertyType
Returns the property type.- Returns:
- The property type.
-
getStringConverterClass
Returns the class that implements the String converter for the type of this property.- Returns:
- An instance of
Optional
that holds the implementation class forStringConverter
.
-