|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jetbrains.kotlin.resolve.PossiblyBareType
public class PossiblyBareType
Bare types are somewhat like raw types, but in Kotlin they are only allowed on the right-hand side of is/as.
For example:
fun foo(a: Any) {
if (a is List) {
// a is known to be List<*> here
}
}
Another example:
fun foo(a: Collection
Method Summary
static PossiblyBareTypebare(TypeConstructor bareTypeConstructor,
boolean nullable)
KotlinTypegetActualType()
TypeConstructorgetBareTypeConstructor()
booleanisBare()
booleanisNullable()
PossiblyBareTypemakeNullable()
TypeReconstructionResultreconstruct(KotlinType subjectType)
java.lang.StringtoString()
static PossiblyBareTypetype(KotlinType actualType)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Method Detail
bare
@NotNull
public static PossiblyBareType bare(@NotNull
TypeConstructor bareTypeConstructor,
boolean nullable)
type
@NotNull
public static PossiblyBareType type(@NotNull
KotlinType actualType)
isBare
public boolean isBare()
getActualType
@NotNull
public KotlinType getActualType()
getBareTypeConstructor
@NotNull
public TypeConstructor getBareTypeConstructor()
isNullable
public boolean isNullable()
makeNullable
public PossiblyBareType makeNullable()
reconstruct
@NotNull
public TypeReconstructionResult reconstruct(@NotNull
KotlinType subjectType)
toString
public java.lang.String toString()
toString in class java.lang.Object
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD