Class CConstant.ValueAccess
java.lang.Object
org.graalvm.nativeimage.c.constant.CConstant.ValueAccess
- Enclosing class:
CConstant
Allows access to the value of a
CConstant during image generation.- Since:
- 19.0
-
Method Summary
-
Method Details
-
get
Returns the value of aCConstant, i.e., the same value that calling the annotated method would return.This method is useful during native image generation, when the annotated method cannot be called.
- Parameters:
declaringClass- The class that contains the method.methodName- The name of the method annotated withCConstant.returnType- The desired type of the returned value. For integer-kind constants, the supported types areLong,Integer, andBoolean. For floating point constants, the only supported type isDouble. For string constants, the only supported type isString.- Returns:
- The value of the C constant.
- Since:
- 19.0
-