public class MSizeAccessor extends AbstractReadSourceAccessor
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
static String |
SIZE_ID |
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
MSizeAccessor() |
MSizeAccessor(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.
|
Class<?> |
getGenericCollectionType(IContext ctxt)
Returns requested generic type if any, otherwise the source's generic type if any.
|
String |
getImplementationId()
Unique addon implementation ID.
|
Class<?> |
getType(IContext ctxt)
Returns requested type if any, otherwise the source's type if any.
|
protected boolean |
parseCollections()
Always false.
|
protected Object |
specificHandleValue(IExecutionContext ctxt,
Object value)
Override this to apply specific transformation on value read from source accessor.
|
clone, equals, getEstimatedReadCost, 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
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
public static final String SIZE_ID
public MSizeAccessor()
public MSizeAccessor(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
protected boolean parseCollections()
parseCollections
in class AbstractReadSourceAccessor
protected Object specificHandleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
specificHandleValue
in class AbstractReadSourceAccessor
MAccessorException
public Class<?> getType(IContext ctxt) throws MAccessorException
AbstractReadSourceAccessor
getType
in interface IAccessor
getType
in class AbstractReadSourceAccessor
MAccessorException
public Class<?> getGenericCollectionType(IContext ctxt) throws MAccessorException
AbstractReadSourceAccessor
getGenericCollectionType
in interface IAccessor
getGenericCollectionType
in class AbstractReadSourceAccessor
MAccessorException