Package com.google.devtools.ksp.symbol
Interface KSValueArgument
-
- All Implemented Interfaces:
-
com.google.devtools.ksp.symbol.KSAnnotated,com.google.devtools.ksp.symbol.KSNode
public interface KSValueArgument implements KSAnnotated
A value argument to function / constructor calls.
Currently, only appears in annotation arguments.
-
-
Method Summary
Modifier and Type Method Description abstract KSNamegetName()The name for the named argument, or null otherwise. abstract BooleanisSpread()True if it is a spread argument (i.e., has a "*" in front of the argument). abstract ObjectgetValue()The value of the argument. -
Methods inherited from class com.google.devtools.ksp.symbol.KSNode
accept, getLocation, getOrigin, getParent -
Methods inherited from class com.google.devtools.ksp.symbol.KSAnnotated
getAnnotations -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getName
abstract KSName getName()
The name for the named argument, or null otherwise.
For example, in
ignore(name=123456), the name value is "name"
-
isSpread
abstract Boolean isSpread()
True if it is a spread argument (i.e., has a "*" in front of the argument).
-
getValue
abstract Object getValue()
The value of the argument.
Can be of one of the possible types:
Byte;
Char;
Int;
Long;
KSType for annotation arguments of type kotlin.reflect.KClass;
KSClassDeclaration for annotation arguments of type Enum (in this caseKSClassDeclaration.classKind equals to ClassKind.ENUM_CLASS);
KSAnnotation for embedded annotation arguments;
Array of a possible type listed above.
-
-
-
-