coins.sym
インタフェース StringConst

すべてのスーパーインタフェース:
Const, Sym, Sym0
既知の実装クラスの一覧:
StringConstImpl

public interface StringConst
extends Const

  StringConst interface
  Const (constant) class interface.
  A constant in source program is recorded as a Const instance
  by using its character string representation as its name.
  There are access methods to get the value of constants and
  to record a constant giving its value.
  Constants are usually represented by symbol table instance
  in order to represent attributes attached to them.
  Subclasses of Const is not so fine as type, foe example,
  int, short, long, unsigned int, unsigned short, unsigned long
  all belongs to IntConst. To see the type of Const object,
  use getSymType() of SymInterface.


フィールドの概要
 
インタフェース coins.sym.Sym から継承したフィールド
KIND_NAME, VISIBILITY
 
インタフェース coins.sym.Sym0 から継承したフィールド
FLAG_ADDRESS_TAKEN, FLAG_CASTLESS_SUBP, FLAG_COMMON, FLAG_COMPLEX_STRUCT, FLAG_DERIVED_SYM, FLAG_GENERATED_SYM, FLAG_INCOMPLETE_TYPE, FLAG_POINTER_OPERATION, FLAG_REGION_ELEM, FLAG_RESERVED_NAME, FLAG_SIZEOF_TAKEN, FLAG_UNFIXED_SIZE, FLAG_UNIFORM_SIZE, FLAG_VALUE_IS_ASSIGNED, KIND_AREG, KIND_BOOL_CONST, KIND_CHAR_CONST, KIND_CONST_FIRST, KIND_CONST_LAST, KIND_ELEM, KIND_EXP_ID, KIND_FLOAT_CONST, KIND_INT_CONST, KIND_LABEL, KIND_MREG, KIND_NAMED_CONST, KIND_OTHER, KIND_PARAM, KIND_REMOVED, KIND_STRING_CONST, KIND_SUBP, KIND_TAG, KIND_TYPE, KIND_VAR, SYM_COMPILE_UNIT, SYM_EXTERN, SYM_PRIVATE, SYM_PROTECTED, SYM_PUBLIC
 
メソッドの概要
 java.lang.Object evaluateAsObject()
          Get the String object representing this constant.
 int getLength()
          getLength Get the length (number of bytes) of the string body.
 java.lang.String getStringBody()
          
  getStringBody Get the body of string (pure string)
      excluding quotes, etc., where the pure string
      is composed of characters excluding escape characters
      and heading, trailing delimiters.
      
 java.lang.String makeCstring()
          makeCstring Change the string body of this string to C string representation adding heading, trailing quotes and escape characters if required.
 java.lang.String makeCstringWithTrailing0()
          makeCstringWithTrailing0 Change the string body of this string to C string representation adding heading, trailing quotes and escape characters if required.
 void setStringBody(java.lang.String pStringBody)
          setStringBody Set the body of the string and its length.
 
インタフェース coins.sym.Const から継承したメソッド
charValue, doubleValue, floatValue, getConstSym, intValue, longValue, shortValue
 
インタフェース coins.sym.Sym から継承したメソッド
baseType, boolConst, charConst, defineVar, derivedSym, floatConst, getDefinedColumn, getDefinedInName, getDefinedLine, getInf, getNameOrNull, getOrAddInf, getOriginalSym, getOriginalSym, getPureName, getSymKindName, getWork, intConst, intObject, isRemoved, makeCstring, makeCstringWithTrailing0, makeEnumTypeName, makeJavaString, makeStructUnionTypeName, makeSubpTypeName, makeVectorTypeName, makeVectorTypeName, makeVectorTypeName, namedConst, pointerType, pointerType, pointerType, regionType, remove, setDefinedFile, setDefinedIn, setDefinedLine, setRecordedIn, setSymKind, setSymType, setUniqueNameSym, setWork, stringConstFromQuotedString, symbol, toStringDetail, toStringShort, vectorType, vectorType, vectorType, vectorTypeUnfixed
 
インタフェース coins.sym.Sym0 から継承したメソッド
charConst, definedType, defineElem, defineLabel, defineParam, defineSubp, defineVar, enumType, floatConst, getDefinedFile, getDefinedIn, getFlag, getName, getNextSym, getRecordedIn, getSymKind, getSymType, getUniqueName, intConst, isGlobal, namedConst, pointerType, setFlag, stringConst, structType, subpType, unionType, vectorType, vectorTypeUnfixed
 

メソッドの詳細

getStringBody

public java.lang.String getStringBody()
  getStringBody Get the body of string (pure string)
      excluding quotes, etc., where the pure string
      is composed of characters excluding escape characters
      and heading, trailing delimiters.
      If source language is C,
      heading and trailing quotes and escape
      characters are removed from the source expression,
      and trailing 0x00 (0x0000 in case of wchar_t) is
      also deleted.


setStringBody

public void setStringBody(java.lang.String pStringBody)
setStringBody Set the body of the string and its length. The parameter should be changed to pure string by using makeStringBody of SourceLanguage before calling this method.

パラメータ:
pStringBody - Body of the string.

makeCstring

public java.lang.String makeCstring()
makeCstring Change the string body of this string to C string representation adding heading, trailing quotes and escape characters if required. Trailing \0 is not added as printable character. See coins.SourceLanguage.

戻り値:
the string changed in C form.

makeCstringWithTrailing0

public java.lang.String makeCstringWithTrailing0()
makeCstringWithTrailing0 Change the string body of this string to C string representation adding heading, trailing quotes and escape characters if required. Trailing \0 is added as printable character with escape char. See coins.SourceLanguage.

戻り値:
the string changed in C form with trailing \0 as printable character.

getLength

public int getLength()
getLength Get the length (number of bytes) of the string body.


evaluateAsObject

public java.lang.Object evaluateAsObject()
Get the String object representing this constant.

定義:
インタフェース Const 内の evaluateAsObject
戻り値:
the String object.