public class PromotionInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PromotionInfo.PromotionType |
Constructor and Description |
---|
PromotionInfo()
Default ctor.
|
PromotionInfo(java.lang.String id)
Constructs a new PromotionInfo object with the identifier of the
field associated with this promotion object.
|
PromotionInfo(java.lang.String id,
int baseDimension,
int targetDimension,
java.lang.String targetType)
Constructs a new PromotionInfo object with all its information.
|
PromotionInfo(java.lang.String id,
java.util.List<DimensionDefinition> dimensions)
Constructs a new PromotionInfo object with the identifier of the field
associated with this promotion and the dimension definition used for
promotion.
|
Modifier and Type | Method and Description |
---|---|
int |
diffDimension()
Get the number of dimension between the base and the target.
|
int |
getBaseDimension()
Get the number of base dimension.
|
java.util.List<DimensionDefinition> |
getDimensions()
Get the list of dimension definition used for promotion.
|
java.lang.String |
getFormattedDimensions()
Get a formatted String representing the dimensions used in this promotion
information object.
|
java.lang.String |
getIdentifier()
Get the associated identifier.
|
PromotionInfo.PromotionType |
getPromotionType()
Get the promotion type.
|
int |
getTargetDimension()
Get the number of target dimension.
|
java.lang.String |
getTargetType()
Get the type id after the promotion.
|
boolean |
isAllocateAdapted()
Check if the allocate statements associated with this promotion have been
adapted already.
|
boolean |
isRefAdapted()
Check if the references associated with this promotion have been adapted
already.
|
void |
readDimensionsFromString(java.lang.String rawValue)
Read the dimension information from a raw string.
|
void |
resterFlags()
Reset adapted flags.
|
void |
setAllocateAdapted()
Flag that the allocate statements associated with this promotion have been
adapted.
|
void |
setBaseDimension(int value)
Set the value of the base dimension number.
|
void |
setDimensions(java.util.List<DimensionDefinition> dimensions)
Set the list of dimension definitions to be used.
|
void |
setPromotionType(PromotionInfo.PromotionType promotionType)
Set the promotion type value.
|
void |
setRefAdapted()
Flag that the references associated with this promotion have been
adapted.
|
void |
setTargetDimension(int value)
Set the value of the target dimension.
|
void |
setTargetType(java.lang.String value)
Set the value of the type after promotion.
|
boolean |
wasScalar()
Check whether the variable was a scalar before the promotion.
|
public PromotionInfo()
public PromotionInfo(java.lang.String id)
id
- Field identifier.public PromotionInfo(java.lang.String id, java.util.List<DimensionDefinition> dimensions)
id
- Field identifier.dimensions
- List of dimension definitions to use for the promotion.public PromotionInfo(java.lang.String id, int baseDimension, int targetDimension, java.lang.String targetType)
id
- Identifier of the promoted variable.baseDimension
- Number of dimensions before the promotion.targetDimension
- Number of dimensions after the promotion.targetType
- Type if after the promotion.public java.util.List<DimensionDefinition> getDimensions()
public void setDimensions(java.util.List<DimensionDefinition> dimensions)
dimensions
- List of dimension definitions.public java.lang.String getIdentifier()
public boolean wasScalar()
public java.lang.String getTargetType()
public void setTargetType(java.lang.String value)
value
- Type hash value.public int getTargetDimension()
public void setTargetDimension(int value)
value
- int value.public int getBaseDimension()
public void setBaseDimension(int value)
value
- New value for the base dimension number.public int diffDimension()
public PromotionInfo.PromotionType getPromotionType()
public void setPromotionType(PromotionInfo.PromotionType promotionType)
promotionType
- New promotion type value.public java.lang.String getFormattedDimensions()
public boolean isRefAdapted()
public void setRefAdapted()
public boolean isAllocateAdapted()
public void setAllocateAdapted()
public void resterFlags()
public void readDimensionsFromString(java.lang.String rawValue)
rawValue
- Raw string representation of the dimension information.