public final class TypeHelper
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static boolean |
isA(TypeNode n,
java.lang.Class<?> clazz) |
|
static boolean |
isA(TypeNode n,
java.lang.String clazzName) |
Checks whether the resolved type of the given
TypeNode n is of the type
given by the clazzName. |
static boolean |
isA(TypedNameDeclaration vnd,
java.lang.Class<?> clazz) |
Deprecated.
|
static boolean |
isEither(TypeNode n,
java.lang.Class<?> class1,
java.lang.Class<?> class2) |
|
static boolean |
isEither(TypedNameDeclaration vnd,
java.lang.Class<?> class1,
java.lang.Class<?> class2) |
Deprecated.
|
static boolean |
isExactlyA(TypeNode n,
java.lang.String clazzName) |
Checks whether the resolved type of the given
TypeNode n is exactly of the type
given by the clazzName. |
static boolean |
isExactlyAny(TypedNameDeclaration vnd,
java.lang.Class<?>... clazzes) |
|
static boolean |
isExactlyNone(TypedNameDeclaration vnd,
java.lang.Class<?>... clazzes) |
|
static boolean |
isNeither(TypedNameDeclaration vnd,
java.lang.Class<?> class1,
java.lang.Class<?> class2) |
Deprecated.
|
static boolean |
subclasses(TypeNode n,
java.lang.Class<?> clazz) |
public static boolean isA(TypeNode n, java.lang.String clazzName)
TypeNode
n is of the type
given by the clazzName. If the clazzName is on the auxclasspath, then also subclasses
are considered.n
- the type node to checkclazzName
- the class name to compare totrue
if type node n is of type clazzName or a subtype of clazzNamepublic static boolean isExactlyA(TypeNode n, java.lang.String clazzName)
TypeNode
n is exactly of the type
given by the clazzName.n
- the type node to checkclazzName
- the class name to compare totrue
if type node n is exactly of type clazzName.public static boolean isA(TypeNode n, java.lang.Class<?> clazz)
isA(TypeNode, String)
public static boolean isEither(TypeNode n, java.lang.Class<?> class1, java.lang.Class<?> class2)
public static boolean isExactlyAny(TypedNameDeclaration vnd, java.lang.Class<?>... clazzes)
public static boolean isExactlyNone(TypedNameDeclaration vnd, java.lang.Class<?>... clazzes)
@Deprecated public static boolean isA(TypedNameDeclaration vnd, java.lang.Class<?> clazz)
@Deprecated public static boolean isEither(TypedNameDeclaration vnd, java.lang.Class<?> class1, java.lang.Class<?> class2)
@Deprecated public static boolean isNeither(TypedNameDeclaration vnd, java.lang.Class<?> class1, java.lang.Class<?> class2)
public static boolean subclasses(TypeNode n, java.lang.Class<?> clazz)
Copyright © 2002–2018 PMD. All rights reserved.