|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.vishia.java2C.CCodeData
public class CCodeData
This is a helper class to return a peace of c-code with associated type information.
| Field Summary | |
|---|---|
(package private) java.lang.String |
cCode
The generated code snippet for this expression. |
(package private) int |
dimensionArrayOrFixSize
0 if the value in the code snipped is scalar, 1.. if it is an array. |
(package private) FieldData |
identInfo
This is the identInfo of the basicly used variable or value type ClassData.classTypeInfo. |
(package private) char |
modeAccess
The access mode may be changed in comparison with identInfos, if a array element is accessed in this code snippet. |
private char |
returnMode
If true, than the cCode represents a method call, which returned the same reference as used for call, it means the method returns this. |
(package private) java.lang.String |
sTempRef
If true, than the cCode represents a setting of a temporary reference. |
| Constructor Summary | |
|---|---|
CCodeData(java.lang.String cCode,
FieldData identInfo)
Initializes the detail information modeAccess and dimensionArrayOrFixSize
with the same values as identInfo. |
|
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess)
Initializes the detail information modeAccess and dimensionArrayOrFixSize
with the same values as identInfo. |
|
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess,
char returnMode)
Initializes the detail information modeAccess and dimensionArrayOrFixSize
with the same values as identInfo. |
|
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess,
int dimensionArray)
Initializes the detail information modeAccess and dimensionArrayOrFixSize
in a special kind. |
|
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess,
int dimensionArray,
char returnMode)
Initializes the detail information modeAccess and dimensionArrayOrFixSize
in a special kind. |
|
| Method Summary | |
|---|---|
LocalIdents |
getClassLevelIdents()
Returns all class level idents, if the code snipped is a reference of a class type. |
(package private) char |
getReturnMode()
|
java.lang.String |
getTypeHeaderfilename()
Returns the name of the Headerfile, which defines the class, if the code snipped is a reference of a class type. |
java.lang.String |
getTypeName()
Returns the String representation of the type of the code snipped, detected from the identInfo and its FieldData.typeClazz. |
(package private) boolean |
isReturnNew()
|
(package private) boolean |
isReturnThis()
|
java.lang.String |
toString()
|
private java.lang.String |
xxxtestAndCast(FieldData dstIdentInfo,
char intension)
Tests and generates a cast if a cast to the destination form is necessary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
java.lang.String cCode
java.lang.String sTempRef
private final char returnMode
char modeAccess
final FieldData identInfo
ClassData.classTypeInfo.
Therefore the information about the type of the code snipped maybe alternating,
var is an array variable with its identinfo here,
but the code snipped contains var[2], therefore the LocalIdents.IdentInfos#dimensionArrayOrFixSize
doesnot match to the codesnipped. See dimensionArrayOrFixSize of this class.
{ 1, 2, 3} is a result of a <constArray> in Java2C.zbnf,
but its identInfo here is of the basicly type of the elements.
final int dimensionArrayOrFixSize
| Constructor Detail |
|---|
CCodeData(java.lang.String cCode,
FieldData identInfo)
modeAccess and dimensionArrayOrFixSize
with the same values as identInfo.
cCode - code snippedidentInfo - the type and access infos to the code snipped.
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess)
modeAccess and dimensionArrayOrFixSize
with the same values as identInfo.
cCode - code snippedidentInfo - the type and access infos to the code snipped.
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess,
char returnMode)
modeAccess and dimensionArrayOrFixSize
with the same values as identInfo.
cCode - code snippedidentInfo - the type and access infos to the code snipped.
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess,
int dimensionArray)
modeAccess and dimensionArrayOrFixSize
in a special kind.
cCode - code snippedidentInfo - the type and access infos to the code snipped.modeAccess - dimensionArrayOrFixSize -
CCodeData(java.lang.String cCode,
FieldData identInfo,
char modeAccess,
int dimensionArray,
char returnMode)
modeAccess and dimensionArrayOrFixSize
in a special kind.
cCode - code snippedidentInfo - the type and access infos to the code snipped.modeAccess - dimensionArrayOrFixSize - | Method Detail |
|---|
boolean isReturnThis()
boolean isReturnNew()
char getReturnMode()
private java.lang.String xxxtestAndCast(FieldData dstIdentInfo,
char intension)
{ CONST_ObjectJc(...), fixArraySize, 0, cCode } is generated
to initialize a static array.
ClassData#testAndcast(ClassData, String, char) is called
for the given FieldData.typeClazz from parameter dstIdentInfo
dstIdentInfo - The type of necessity appearance of the code snipped,
enclosing the representation of the type.intension - see ClassData#testAndcast(ClassData, String, char).
cCode or the casted form.public java.lang.String getTypeName()
identInfo and its FieldData.typeClazz.
public LocalIdents getClassLevelIdents()
public java.lang.String getTypeHeaderfilename()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||