@PersistantProperty(property="targetType") @PersistantProperty(property="targetGenericType") public class MCastAccessor extends AbstractReadSourceAccessor
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
static String |
CAST_ID |
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
MCastAccessor() |
MCastAccessor(IReadAccessor source) |
MCastAccessor(IReadAccessor source,
Class<?> targetType) |
MCastAccessor(IReadAccessor source,
Class<?> targetType,
Class<?> targetGenericType) |
Modifier and Type | Method and Description |
---|---|
MCastAccessor |
clone()
Clones the Addon.
|
<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.
|
boolean |
equals(Object o) |
String |
getImplementationId()
Unique addon implementation ID.
|
Class<?> |
getTargetGenericType() |
Class<?> |
getTargetType() |
int |
hashCode() |
protected boolean |
parseCollections()
Always false.
|
void |
setTargetGenericType(Class<?> targetGenericType) |
void |
setTargetType(Class<?> targetType) |
Object |
specificHandleValue(IExecutionContext ctxt,
Object value)
Override this to apply specific transformation on value read from source accessor.
|
void |
toString(OuterWithLevel outer)
Method used to send String representation of the current object to the
OuterWithLevel . |
getEstimatedReadCost, getGenericCollectionType, getInternalCacheIdentifier, getSource, getType, handleValue, internalGet, isCacheUsed, isConstantValue, isInternalCacheIdentifierNeeded, isShouldIterate, resetCachedData, setInternalCacheIdentifier, setSource, 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 CAST_ID
public MCastAccessor()
public MCastAccessor(IReadAccessor source)
public MCastAccessor(IReadAccessor source, Class<?> targetType)
public MCastAccessor(IReadAccessor source, Class<?> targetType, Class<?> targetGenericType)
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
public Object specificHandleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
specificHandleValue
in class AbstractReadSourceAccessor
MAccessorException
public String getImplementationId()
IAddon
public MCastAccessor clone()
IAddon
clone
in interface IAccessor
clone
in interface IReadAccessor
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in class AbstractReadSourceAccessor
public boolean equals(Object o)
equals
in class AbstractReadSourceAccessor
public int hashCode()
hashCode
in class AbstractReadSourceAccessor
public void toString(OuterWithLevel outer) throws IOException
Outable
OuterWithLevel
.toString
in interface Outable
toString
in class AbstractReadSourceAccessor
IOException
public Class<?> getTargetType()
public void setTargetType(Class<?> targetType)
public Class<?> getTargetGenericType()
public void setTargetGenericType(Class<?> targetGenericType)