public abstract class AbstractMapAccessor extends AbstractReadSourceAccessor
IReadAccessor.Standalone
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
AbstractMapAccessor() |
AbstractMapAccessor(IReadAccessor source) |
Modifier and Type | Method and Description |
---|---|
<G,C extends Collection<G>> |
compileCollection(ICompilationContext ctxt,
Class<C> expectedType,
Class<G> expectedGenericType)
Implementation to handle case when expected result is a Collection.
|
void |
compileValue(ICompilationContext ctxt,
Class<?> expectedType)
Implementation to handle case when expected result is a single value.
|
protected abstract Class<?> |
getDefaultType() |
Class<?> |
getType(IContext ctxt)
Returns requested type if any, otherwise the source's type if any.
|
protected abstract Object |
handleMap(Map<?,?> value) |
protected boolean |
parseCollections()
Always true.
|
Object |
specificHandleValue(IExecutionContext ctxt,
Object value)
Override this to apply specific transformation on value read from source accessor.
|
clone, equals, getEstimatedReadCost, getGenericCollectionType, getInternalCacheIdentifier, getSource, handleValue, hashCode, internalGet, isCacheUsed, isConstantValue, isInternalCacheIdentifierNeeded, isShouldIterate, resetCachedData, setInternalCacheIdentifier, setSource, toString, wasRegistered
castToExpected, compileRead, compileRead, compileRead, compileRead, get, getGenericTypes, isShouldBeWrappedToConstantValue, isShouldNotCache
optimize, toString
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
finalize, getClass, notify, notifyAll, wait, wait, wait
getImplementationId, optimize
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
public AbstractMapAccessor()
public AbstractMapAccessor(IReadAccessor source)
public void compileValue(ICompilationContext ctxt, Class<?> expectedType) throws MRuleValidationException
AbstractReadAccessor
compileValue
in class AbstractReadAccessor
MRuleValidationException
public <G,C extends Collection<G>> void compileCollection(ICompilationContext ctxt, Class<C> expectedType, Class<G> expectedGenericType) throws MRuleValidationException
AbstractReadAccessor
compileCollection
in class AbstractReadAccessor
MRuleValidationException
public Object specificHandleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
specificHandleValue
in class AbstractReadSourceAccessor
MAccessorException
protected abstract Class<?> getDefaultType()
protected boolean parseCollections()
parseCollections
in class AbstractReadSourceAccessor
public Class<?> getType(IContext ctxt) throws MAccessorException
AbstractReadSourceAccessor
getType
in interface IAccessor
getType
in class AbstractReadSourceAccessor
MAccessorException