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 booleanisA(TypeNode n, Class<?> clazz)Deprecated.static booleanisA(TypeNode n, String clazzName)Deprecated.static booleanisA(TypedNameDeclaration vnd, Class<?> clazz)Deprecated.static booleanisA(TypedNameDeclaration vnd, String className)Deprecated.static booleanisEither(TypeNode n, Class<?> class1, Class<?> class2)Deprecated.Not useful, useTypeTestUtil.isA(Class, TypeNode)static booleanisEither(TypedNameDeclaration vnd, Class<?> class1, Class<?> class2)Deprecated.Not useful, useTypeTestUtil.isA(Class, TypeNode)static booleanisExactlyA(TypeNode n, String clazzName)Deprecated.static booleanisExactlyAny(TypedNameDeclaration vnd, Class<?>... clazzes)Deprecated.Not useful, useTypedNameDeclaration.getTypeNode()andTypeTestUtil.isExactlyA(Class, TypeNode)static booleanisExactlyNone(TypedNameDeclaration vnd, Class<?>... clazzes)Deprecated.Not useful, use a negatedTypeTestUtil.isExactlyA(Class, TypeNode)static booleanisNeither(TypedNameDeclaration vnd, Class<?> class1, Class<?> class2)Deprecated.Not useful, use a negatedTypeTestUtil.isA(Class, TypeNode)static booleansubclasses(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 givenTypeNoden 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:
trueif 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 givenTypeNoden is exactly of the type given by the clazzName.- Parameters:
n- the type node to checkclazzName- the class name to compare to- Returns:
trueif 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.
-
-