Class SimpleTypedNameDeclaration
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.symboltable.SimpleTypedNameDeclaration
-
- All Implemented Interfaces:
TypedNameDeclaration
public class SimpleTypedNameDeclaration extends java.lang.Object implements TypedNameDeclaration
Just stores a type image and a actual type. And makes it easy to compare these.
-
-
Constructor Summary
Constructors Constructor Description SimpleTypedNameDeclaration(java.lang.String typeImage, java.lang.Class<?> type)Creates a newSimpleTypedNameDeclarationwith the given typeSimpleTypedNameDeclaration(java.lang.String typeImage, java.lang.Class<?> type, SimpleTypedNameDeclaration next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNext(SimpleTypedNameDeclaration next)booleanequals(java.lang.Object obj)java.lang.Class<?>getType()java.lang.StringgetTypeImage()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
SimpleTypedNameDeclaration
public SimpleTypedNameDeclaration(java.lang.String typeImage, java.lang.Class<?> type)Creates a newSimpleTypedNameDeclarationwith the given type- Parameters:
typeImage- the type imagetype- the actual type
-
SimpleTypedNameDeclaration
public SimpleTypedNameDeclaration(java.lang.String typeImage, java.lang.Class<?> type, SimpleTypedNameDeclaration next)
-
-
Method Detail
-
addNext
public void addNext(SimpleTypedNameDeclaration next)
-
getTypeImage
public java.lang.String getTypeImage()
- Specified by:
getTypeImagein interfaceTypedNameDeclaration
-
getType
public java.lang.Class<?> getType()
- Specified by:
getTypein interfaceTypedNameDeclaration
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Additionally - two
SimpleTypedNameDeclarationare equal, if they contain types, that can be cast into each other.- Overrides:
equalsin classjava.lang.Object
-
-