Class TypeHelper
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.typeresolution.TypeHelper
-
@Deprecated public final class TypeHelper extends Object
Deprecated.Use the similarTypeTestUtil
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
isA(TypeNode n, Class<?> clazz)
Deprecated.static boolean
isA(TypeNode n, String clazzName)
Deprecated.static boolean
isA(TypedNameDeclaration vnd, Class<?> clazz)
Deprecated.static boolean
isA(TypedNameDeclaration vnd, String className)
Deprecated.static boolean
isEither(TypeNode n, Class<?> class1, Class<?> class2)
Deprecated.Not useful, useTypeTestUtil.isA(Class, TypeNode)
static boolean
isEither(TypedNameDeclaration vnd, Class<?> class1, Class<?> class2)
Deprecated.Not useful, useTypeTestUtil.isA(Class, TypeNode)
static boolean
isExactlyA(TypeNode n, String clazzName)
Deprecated.static boolean
isExactlyAny(TypedNameDeclaration vnd, Class<?>... clazzes)
Deprecated.Not useful, useTypedNameDeclaration.getTypeNode()
andTypeTestUtil.isExactlyA(Class, TypeNode)
static boolean
isExactlyNone(TypedNameDeclaration vnd, Class<?>... clazzes)
Deprecated.Not useful, use a negatedTypeTestUtil.isExactlyA(Class, TypeNode)
static boolean
isNeither(TypedNameDeclaration vnd, Class<?> class1, Class<?> class2)
Deprecated.Not useful, use a negatedTypeTestUtil.isA(Class, TypeNode)
static boolean
subclasses(TypeNode n, Class<?> clazz)
Deprecated.
-
-
-
Method Detail
-
isA
@Deprecated public static boolean isA(TypeNode n, String clazzName)
Deprecated.Checks whether the resolved type of the givenTypeNode
n is of the type given by the clazzName. If the clazzName is on the auxclasspath, then also subclasses are considered.If clazzName is not on the auxclasspath (so it can't be resolved), then a string comparison of the class names are performed. This might result in comparing only the simple name of the classes.
- Parameters:
n
- the type node to checkclazzName
- the class name to compare to- Returns:
true
if type node n is of type clazzName or a subtype of clazzName
-
isExactlyA
@Deprecated public static boolean isExactlyA(TypeNode n, String clazzName)
Deprecated.Checks whether the resolved type of the givenTypeNode
n is exactly of the type given by the clazzName.- Parameters:
n
- the type node to checkclazzName
- the class name to compare to- Returns:
true
if type node n is exactly of type clazzName.
-
isA
@Deprecated public static boolean isA(TypeNode n, Class<?> clazz)
Deprecated.
-
isEither
@Deprecated public static boolean isEither(TypeNode n, Class<?> class1, Class<?> class2)
Deprecated.Not useful, useTypeTestUtil.isA(Class, TypeNode)
-
isExactlyAny
@Deprecated public static boolean isExactlyAny(TypedNameDeclaration vnd, Class<?>... clazzes)
Deprecated.Not useful, useTypedNameDeclaration.getTypeNode()
andTypeTestUtil.isExactlyA(Class, TypeNode)
-
isExactlyNone
@Deprecated public static boolean isExactlyNone(TypedNameDeclaration vnd, Class<?>... clazzes)
Deprecated.Not useful, use a negatedTypeTestUtil.isExactlyA(Class, TypeNode)
-
isA
@Deprecated public static boolean isA(TypedNameDeclaration vnd, Class<?> clazz)
Deprecated.
-
isEither
@Deprecated public static boolean isEither(TypedNameDeclaration vnd, Class<?> class1, Class<?> class2)
Deprecated.Not useful, useTypeTestUtil.isA(Class, TypeNode)
-
isNeither
@Deprecated public static boolean isNeither(TypedNameDeclaration vnd, Class<?> class1, Class<?> class2)
Deprecated.Not useful, use a negatedTypeTestUtil.isA(Class, TypeNode)
-
subclasses
@Deprecated public static boolean subclasses(TypeNode n, Class<?> clazz)
Deprecated.
-
isA
public static boolean isA(TypedNameDeclaration vnd, String className)
Deprecated.
-
-