Package org.openbase.jps.core
Class AbstractJavaProperty<V>
java.lang.Object
org.openbase.jps.core.AbstractJavaProperty<V>
- Type Parameters:
V-
- All Implemented Interfaces:
Comparable<AbstractJavaProperty>
- Direct Known Subclasses:
AbstractJPBoolean,AbstractJPClass,AbstractJPDouble,AbstractJPEnum,AbstractJPFile,AbstractJPFloat,AbstractJPInteger,AbstractJPList,AbstractJPLong,AbstractJPMap,AbstractJPMethod,AbstractJPString,AbstractJPTime,JPHelp,JPLocale
public abstract class AbstractJavaProperty<V>
extends Object
implements Comparable<AbstractJavaProperty>
- Author:
- Divine Threepwood
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddArgument(String arg) protected final voidaddErrorReport(Exception exception, AbstractJavaProperty.ValueType valueType) protected final voidcheckArgumentCount(int size) protected final voidcheckArgumentCount(int min, int max) protected final voidcheckArgumentCountMax(int max) protected final voidcheckArgumentCountMin(int min) final intprotected abstract String[]protected final String[]final Vfinal List<Class<? extends AbstractJavaProperty<?>>>Method returns a list with properties where this property depends on.abstract StringMethod returns the description of the property.protected final Exceptionprotected final Map<AbstractJavaProperty.ValueType,Exception> protected final Stringprotected abstract Vprotected final String[]final VgetValue()protected final booleanprotected booleanDeprecated.please use isIdentified() insteadfinal booleanisParsed()protected voidCan be overwritten for specific load action.protected final booleanprotected final booleanprotected final voidoverwriteDefaultValue(V defaultValue) protected abstract Vprotected final voidprotected final voidregisterDependingProperty(Class<? extends AbstractJavaProperty<?>> dependency) protected final voidreset()protected voidsetValue(V value, AbstractJavaProperty.ValueType valueType) toString()final voidprotected final voidprotected voidvalidate()Can be overwritten for value validation.
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
propertyIdentifiers
-
argumentIdentifiers
-
arguments
-
identifier
-
-
Constructor Details
-
AbstractJavaProperty
-
-
Method Details
-
match
-
neetToBeParsed
protected final boolean neetToBeParsed() -
reset
protected final void reset() -
addArgument
-
parseArguments
- Throws:
JPParsingException
-
getValue
-
setValue
-
update
-
updateValue
- Throws:
JPServiceException
-
overwriteDefaultValue
-
toString
-
isIdentifiered
Deprecated.please use isIdentified() instead -
isIdentified
protected final boolean isIdentified() -
getDefaultValue
- Throws:
JPNotAvailableException
-
generateArgumentIdentifiers
-
getPropertyIdentifiers
-
getArgumentIdentifiers
-
getDefaultExample
-
getSyntax
-
isParsed
public final boolean isParsed() -
compareTo
- Specified by:
compareToin interfaceComparable<V>
-
getOneArgumentResult
- Throws:
JPBadArgumentException
-
getValueType
-
checkArgumentCount
- Throws:
JPBadArgumentException
-
checkArgumentCountMin
- Throws:
JPBadArgumentException
-
checkArgumentCountMax
- Throws:
JPBadArgumentException
-
checkArgumentCount
- Throws:
JPBadArgumentException
-
addErrorReport
-
getErrorReport
-
getErrorReportMap
-
validate
Can be overwritten for value validation. Method is called after parsing.- Throws:
JPValidationException
-
loadAction
protected void loadAction()Can be overwritten for specific load action. Method is called after loading a property instance. -
getPropertyDefaultValue
- Throws:
JPNotAvailableException
-
parse
- Throws:
Exception
-
getDependencyList
Method returns a list with properties where this property depends on.- Returns:
- a list of java properties.
-
registerDependingProperty
-
getDescription
Method returns the description of the property.
-