net.sourceforge.pmd.lang.java.symboltable
Class SimpleTypedNameDeclaration

java.lang.Object
  extended by net.sourceforge.pmd.lang.java.symboltable.SimpleTypedNameDeclaration
All Implemented Interfaces:
TypedNameDeclaration

public class SimpleTypedNameDeclaration
extends Object
implements TypedNameDeclaration

Just stores a type image and a actual type. And makes it easy to compare these.


Constructor Summary
SimpleTypedNameDeclaration(String typeImage, Class<?> type)
          Creates a new SimpleTypedNameDeclaration with the given type
SimpleTypedNameDeclaration(String typeImage, Class<?> type, SimpleTypedNameDeclaration next)
           
 
Method Summary
 void addNext(SimpleTypedNameDeclaration next)
           
 boolean equals(Object obj)
          
 Class<?> getType()
           
 String getTypeImage()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleTypedNameDeclaration

public SimpleTypedNameDeclaration(String typeImage,
                                  Class<?> type)
Creates a new SimpleTypedNameDeclaration with the given type

Parameters:
typeImage - the type image
type - the actual type

SimpleTypedNameDeclaration

public SimpleTypedNameDeclaration(String typeImage,
                                  Class<?> type,
                                  SimpleTypedNameDeclaration next)
Method Detail

addNext

public void addNext(SimpleTypedNameDeclaration next)

getTypeImage

public String getTypeImage()
Specified by:
getTypeImage in interface TypedNameDeclaration

getType

public Class<?> getType()
Specified by:
getType in interface TypedNameDeclaration

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Additionally - two SimpleTypedNameDeclaration are equal, if they contain types, that can be cast into each other.

Overrides:
equals in class Object


Copyright © 2002-2016 InfoEther. All Rights Reserved.