Class NullType
- java.lang.Object
-
- com.github.javaparser.resolution.model.typesystem.NullType
-
- All Implemented Interfaces:
ResolvedType
public class NullType extends Object implements ResolvedType
This is a virtual type used to represent null values.- Author:
- Federico Tomassetti
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describe()
boolean
isArray()
boolean
isAssignableBy(ResolvedType other)
This method checks if ThisType t = new OtherType() would compile.boolean
isNull()
Is this the null type?boolean
isReferenceType()
Can this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?boolean
isTypeVariable()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.types.ResolvedType
arrayLevel, asArrayType, asConstraintType, asPrimitive, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, asWildcard, erasure, isConstraint, isInferenceVariable, isNumericType, isPrimitive, isReference, isUnionType, isVoid, isWildcard, mention, replaceTypeVariables, replaceTypeVariables, solveGenericTypes, toDescriptor
-
-
-
-
Field Detail
-
INSTANCE
public static final NullType INSTANCE
-
-
Method Detail
-
isArray
public boolean isArray()
- Specified by:
isArray
in interfaceResolvedType
- Returns:
- true, if this type represent an array - otherwise false.
-
isNull
public boolean isNull()
Description copied from interface:ResolvedType
Is this the null type?- Specified by:
isNull
in interfaceResolvedType
-
isReferenceType
public boolean isReferenceType()
Description copied from interface:ResolvedType
Can this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?- Specified by:
isReferenceType
in interfaceResolvedType
-
describe
public String describe()
- Specified by:
describe
in interfaceResolvedType
-
isTypeVariable
public boolean isTypeVariable()
- Specified by:
isTypeVariable
in interfaceResolvedType
-
isAssignableBy
public boolean isAssignableBy(ResolvedType other)
Description copied from interface:ResolvedType
This method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableBy
in interfaceResolvedType
-
-