Class SBPropertyDescriptor.SingleValueSetter
- java.lang.Object
-
- com.streambase.sb.operator.parameter.SBPropertyDescriptor.SingleValueSetter
-
- Enclosing class:
- SBPropertyDescriptor
protected abstract static class SBPropertyDescriptor.SingleValueSetter extends Object
This abstract specialization of Setter assumes that the property type will have a single value (which currently accounts for all property types except string lists). It extracts the value of that parameter from the map and calls an abstract parse method on it.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleValueSetter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Object[]
getArgs(SBPropertyDescriptor pd, Map<String,List<Object>> params, SchemaUtil.SchemaProvider schemaProvider)
Get the setter arguments for Method.invoke, consume the property values.protected abstract Object[]
parseArgs(SBPropertyDescriptor pd, String val, SchemaUtil.SchemaProvider schemaProvider)
Parse the single argument value from a string into the array of parameters to pass to the setter method.-
Methods inherited from class com.streambase.sb.operator.parameter.SBPropertyDescriptor.Setter
getSingleValue, getValue, getValues, set
-
-
-
-
Method Detail
-
getArgs
protected Object[] getArgs(SBPropertyDescriptor pd, Map<String,List<Object>> params, SchemaUtil.SchemaProvider schemaProvider) throws TypecheckException
Description copied from class:SBPropertyDescriptor.Setter
Get the setter arguments for Method.invoke, consume the property values. Returns null to indicate that the setter should not be called (ie, if an optional parameter was omitted)- Specified by:
getArgs
in classSBPropertyDescriptor.Setter
- Parameters:
pd
- property descriptorparams
- parametersschemaProvider
- a schema provider- Returns:
- null if the setter should not be called
- Throws:
TypecheckException
- on type check exception
-
parseArgs
protected abstract Object[] parseArgs(SBPropertyDescriptor pd, String val, SchemaUtil.SchemaProvider schemaProvider) throws TypecheckException
Parse the single argument value from a string into the array of parameters to pass to the setter method. This can return null to skip calling the setter.- Parameters:
pd
- a property descriptorval
- for the setter methodschemaProvider
- a schema provider- Returns:
- null if the setter should not be called
- Throws:
TypecheckException
- on type check exception
-
-