org.jetbrains.kotlin.resolve.constants
Class CompileTimeConstant<T>

java.lang.Object
  extended by org.jetbrains.kotlin.resolve.constants.CompileTimeConstant<T>
Direct Known Subclasses:
AnnotationValue, ArrayValue, BooleanValue, DoubleValue, EnumValue, ErrorValue, FloatValue, IntegerValueConstant, JavaClassValue, NullValue, StringValue

public abstract class CompileTimeConstant<T>
extends java.lang.Object


Field Summary
protected  T value
           
 
Constructor Summary
protected CompileTimeConstant(T value, boolean canBeUsedInAnnotations, boolean isPure, boolean usesVariableAsConstant)
           
 
Method Summary
abstract
<R,D> R
accept(AnnotationArgumentVisitor<R,D> visitor, D data)
           
 boolean canBeUsedInAnnotations()
           
abstract  JetType getType(KotlinBuiltIns kotlinBuiltIns)
           
 T getValue()
           
 boolean isPure()
           
 boolean usesVariableAsConstant()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected final T value
Constructor Detail

CompileTimeConstant

protected CompileTimeConstant(T value,
                              boolean canBeUsedInAnnotations,
                              boolean isPure,
                              boolean usesVariableAsConstant)
Method Detail

canBeUsedInAnnotations

public boolean canBeUsedInAnnotations()

isPure

public boolean isPure()

usesVariableAsConstant

public boolean usesVariableAsConstant()

getValue

@Nullable
public T getValue()

getType

@NotNull
public abstract JetType getType(@NotNull
                                        KotlinBuiltIns kotlinBuiltIns)

accept

public abstract <R,D> R accept(AnnotationArgumentVisitor<R,D> visitor,
                               D data)