net.sourceforge.pmd.cpd
Class TokenEntry

java.lang.Object
  extended by net.sourceforge.pmd.cpd.TokenEntry
All Implemented Interfaces:
Comparable<TokenEntry>

public class TokenEntry
extends Object
implements Comparable<TokenEntry>

Since:
2.2

Field Summary
static TokenEntry EOF
          Shared instance of end-of-file token.
 
Constructor Summary
TokenEntry(String image, String tokenSrcID, int beginLine)
           
 
Method Summary
static void clearImages()
           
 int compareTo(TokenEntry other)
           
 boolean equals(Object o)
           
 int getBeginLine()
           
static TokenEntry getEOF()
          End-of-file token.
 int getIdentifier()
           
 int getIndex()
           
 String getTokenSrcID()
           
 String getValue()
          For internal use only.
 int hashCode()
           
 void setHashCode(int hashCode)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF

public static final TokenEntry EOF
Shared instance of end-of-file token.

Not intended to be used by clients - getEOF() should be used instead.

Constructor Detail

TokenEntry

public TokenEntry(String image,
                  String tokenSrcID,
                  int beginLine)
Parameters:
image - string representation of token
tokenSrcID - within Sonar Ecosystem - absolute path to file, otherwise current implementation of sonar-cpd-plugin will not work
beginLine - number of line
Method Detail

getValue

@Beta
public String getValue()
For internal use only.

Since:
2.14

getEOF

public static TokenEntry getEOF()
End-of-file token.


clearImages

public static void clearImages()

getTokenSrcID

public String getTokenSrcID()

getBeginLine

public int getBeginLine()

getIdentifier

public int getIdentifier()

getIndex

public int getIndex()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setHashCode

public void setHashCode(int hashCode)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(TokenEntry other)
Specified by:
compareTo in interface Comparable<TokenEntry>


Copyright © 2009-2012 SonarSource. All Rights Reserved.