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 newSimpleTypedNameDeclaration
with 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 void
addNext(SimpleTypedNameDeclaration next)
boolean
equals(java.lang.Object obj)
java.lang.Class<?>
getType()
java.lang.String
getTypeImage()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
SimpleTypedNameDeclaration
public SimpleTypedNameDeclaration(java.lang.String typeImage, java.lang.Class<?> type)
Creates a newSimpleTypedNameDeclaration
with 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:
getTypeImage
in interfaceTypedNameDeclaration
-
getType
public java.lang.Class<?> getType()
- Specified by:
getType
in interfaceTypedNameDeclaration
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Additionally - two
SimpleTypedNameDeclaration
are equal, if they contain types, that can be cast into each other.- Overrides:
equals
in classjava.lang.Object
-
-