Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pmd.symboltable
Class NameOccurrence

    java.lang.Object
      net.sourceforge.pmd.symboltable.NameOccurrence

    public class NameOccurrence

extends java.lang.Object

Constructor Summary
`NameOccurrence(SimpleNode location, java.lang.String image)`

Method Summary
`boolean` | `equals(java.lang.Object o)`
`int` | `getArgumentCount()`
`java.lang.String` | `getImage()`
`SimpleNode` | `getLocation()`
`NameOccurrence` | `getNameForWhichThisIsAQualifier()`
`int` | `hashCode()`
`boolean` | `isMethodOrConstructorInvocation()`
`boolean` | `isOnLeftHandSide()` A handy method to assert if the name is on the right hand side or the left hand side of an expression.
`boolean` | `isOnRightHandSide()`
`boolean` | `isPartOfQualifiedName()`
`boolean` | `isSelfAssignment()` Assert it the occurrence is a self assignment such as: `i += 3;`
`boolean` | `isThisOrSuper()` Simply return true is the image is equal to keyword 'this' or 'super'.
`void` | `setArgumentCount(int count)`
`void` | `setIsMethodOrConstructorInvocation()`
`void` | `setNameWhichThisQualifies(NameOccurrence qualifiedName)`
`java.lang.String` | `toString()`
`boolean` | `useThisOrSuper()` Simply return if the image start with keyword 'this' or 'super'.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### NameOccurrence

    public NameOccurrence(SimpleNode location,
                          java.lang.String image)

Method Detail

### setIsMethodOrConstructorInvocation

    public void setIsMethodOrConstructorInvocation()

### setArgumentCount

    public void setArgumentCount(int count)

### getArgumentCount

    public int getArgumentCount()

### isMethodOrConstructorInvocation

    public boolean isMethodOrConstructorInvocation()

### setNameWhichThisQualifies

    public void setNameWhichThisQualifies(NameOccurrence qualifiedName)

### getNameForWhichThisIsAQualifier

    public NameOccurrence getNameForWhichThisIsAQualifier()

### isPartOfQualifiedName

    public boolean isPartOfQualifiedName()

### getLocation

    public SimpleNode getLocation()

### isOnRightHandSide

    public boolean isOnRightHandSide()

### isOnLeftHandSide

    public boolean isOnLeftHandSide()

  A handy method to assert if the name is on the right hand side or the left hand side of an expression. One basic example: `obj.getMethod(); // Name "getMethod()" returns false, "obj" returns true`

  Returns:

### isSelfAssignment

    public boolean isSelfAssignment()

  Assert it the occurrence is a self assignment such as: `i += 3;`

  Returns:
    true, if the occurrence is self-assignment, false, otherwise.

### isThisOrSuper

    public boolean isThisOrSuper()

  Simply return true is the image is equal to keyword 'this' or 'super'.

  Returns:
    return true if image equal to 'this' or 'super'.

### useThisOrSuper

    public boolean useThisOrSuper()

  Simply return if the image start with keyword 'this' or 'super'.

  Returns:
    true, if keyword is used, false otherwise.

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### getImage

    public java.lang.String getImage()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2009 InfoEther. All Rights Reserved.