Interface IJavaConstantFactory
Builder for Java AST constants.
-
Method Summary
Modifier and TypeMethodDescriptiondefault IJavaConstantcreateBoolean(boolean v) Create an ASTbooleanvalue.createBoolean(boolean v, String originInfo) Create an ASTbooleanvalue.default IJavaConstantcreateByte(byte v) Create an ASTbytevalue.createByte(byte v, String originInfo) Create an ASTbytevalue.default IJavaConstantcreateChar(char v) Create an ASTcharvalue.createChar(char v, String originInfo) Create an ASTcharvalue.default IJavaConstantcreateDouble(double v) Create an ASTdoublevalue.createDouble(double v, String originInfo) Create an ASTdoublevalue.default IJavaConstantcreateFloat(float v) Create an ASTfloatvalue.createFloat(float v, String originInfo) Create an ASTfloatvalue.default IJavaConstantcreateInt(int v) Create an ASTintvalue.Create an ASTintvalue.default IJavaConstantcreateLong(long v) Create an ASTlongvalue.createLong(long v, String originInfo) Create an ASTlongvalue.Retrieve the ASTnullvalue.default IJavaConstantcreateShort(short v) Create an ASTshortvalue.createShort(short v, String originInfo) Create an ASTshortvalue.default IJavaConstantCreate an AST String object.createString(String v, String originInfo) Create an AST String object.
-
Method Details
-
createNull
IJavaConstant createNull()Retrieve the ASTnullvalue.- Returns:
- the
nullconstant
-
createBoolean
Create an ASTbooleanvalue.- Parameters:
v- boolean value- Returns:
- boolean constant
-
createBoolean
Create an ASTbooleanvalue.- Parameters:
v- boolean valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- boolean constant
-
createByte
Create an ASTbytevalue.- Parameters:
v- byte value- Returns:
- byte constant
-
createByte
Create an ASTbytevalue.- Parameters:
v- byte valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- byte constant
-
createChar
Create an ASTcharvalue.- Parameters:
v- char value- Returns:
- char constant
-
createChar
Create an ASTcharvalue.- Parameters:
v- char valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- char constant
-
createShort
Create an ASTshortvalue.- Parameters:
v- short value- Returns:
- short constant
-
createShort
Create an ASTshortvalue.- Parameters:
v- short valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- short constant
-
createInt
Create an ASTintvalue.- Parameters:
v- int value- Returns:
- int constant
-
createInt
Create an ASTintvalue.- Parameters:
v- int valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- int constant
-
createLong
Create an ASTlongvalue.- Parameters:
v- long value- Returns:
- long constant
-
createLong
Create an ASTlongvalue.- Parameters:
v- long valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- long constant
-
createFloat
Create an ASTfloatvalue.- Parameters:
v- float value- Returns:
- float constant
-
createFloat
Create an ASTfloatvalue.- Parameters:
v- float valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- float constant
-
createDouble
Create an ASTdoublevalue.- Parameters:
v- double value- Returns:
- double constant
-
createDouble
Create an ASTdoublevalue.- Parameters:
v- double valueoriginInfo- optional metadata information indicating the origin of the value- Returns:
- double constant
-
createString
Create an AST String object.- Parameters:
v- string value- Returns:
- string constant
-
createString
Create an AST String object. Note that the created object is not necessarily backed by a lower-level (dex) string item. If the user needs to ensure that an AST String object is backed by a dex item, the existence of a matching dex string must be verified, or a new dex string be created. Refer toIDexUnit.addString(String).- Parameters:
v- string valueoriginInfo- optional metadata information indicating the origin of the string; leave null if not necessary- Returns:
- string constant
-