checkers.util
Class TypesUtils

java.lang.Object
  extended by checkers.util.TypesUtils

@DefaultQualifier(value="checkers.nullness.quals.NonNull")
public final class TypesUtils
extends Object

A Utilities class that helps with Elements.


Method Summary
static Name getQualifiedName(DeclaredType type)
          Gets the fully qualified name for a provided type.
static boolean isAnonymousType(TypeMirror type)
          Checks if the type represents an anonymous type, e.g.
static boolean isBoxedPrimitive(TypeMirror type)
           
static boolean isObject(TypeMirror type)
          Checks if the type represents a java.lang.Object declared type
static boolean isThrowable(TypeMirror type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getQualifiedName

public static Name getQualifiedName(DeclaredType type)
Gets the fully qualified name for a provided type. It returns an empty name if type is an anonymous type.

Parameters:
type - the declared type
Returns:
the name corresponding to that type

isObject

public static boolean isObject(TypeMirror type)
Checks if the type represents a java.lang.Object declared type

Parameters:
type - the type
Returns:
true iff type represents java.lang.Object

isAnonymousType

public static boolean isAnonymousType(TypeMirror type)
Checks if the type represents an anonymous type, e.g. as a result of an intersection type

Parameters:
type - the declared type
Returns:
true iff the type represents an anonymous type.

isBoxedPrimitive

public static boolean isBoxedPrimitive(TypeMirror type)

isThrowable

public static boolean isThrowable(TypeMirror type)
Returns:
type represents a Trowable type (e.g. Exception, Error)