edu.rice.cs.cunit.classFile.constantPool.visitors
Class CheckClassOrEmptyVisitor

java.lang.Object
  extended by edu.rice.cs.cunit.classFile.constantPool.visitors.ADefaultPoolInfoVisitor<APoolInfo,java.lang.Object>
      extended by edu.rice.cs.cunit.classFile.constantPool.visitors.CheckClassOrEmptyVisitor
All Implemented Interfaces:
IPoolInfoVisitor<APoolInfo,java.lang.Object>

public class CheckClassOrEmptyVisitor
extends ADefaultPoolInfoVisitor<APoolInfo,java.lang.Object>

Check that the host is a class info.

Author:
Mathias Ricken

Field Summary
private static CheckClassOrEmptyVisitor _instance
          Singleton instance.
 
Constructor Summary
private CheckClassOrEmptyVisitor()
          Singleton constructor.
 
Method Summary
 APoolInfo classCase(ClassPoolInfo host, java.lang.Object o)
          Return host.
 ClassPoolInfo defaultCase(APoolInfo host, java.lang.Object o)
          All other cases throw.
 APoolInfo emptyCase(EmptyPoolInfo host, java.lang.Object o)
          Return host.
static CheckClassOrEmptyVisitor singleton()
          Singleton accessor.
 
Methods inherited from class edu.rice.cs.cunit.classFile.constantPool.visitors.ADefaultPoolInfoVisitor
asciizCase, doubleCase, fieldCase, floatCase, intCase, interfaceMethodCase, longCase, methodCase, nameAndTypeCase, stringCase, unicodeCase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_instance

private static CheckClassOrEmptyVisitor _instance
Singleton instance.

Constructor Detail

CheckClassOrEmptyVisitor

private CheckClassOrEmptyVisitor()
Singleton constructor.

Method Detail

singleton

public static CheckClassOrEmptyVisitor singleton()
Singleton accessor.

Returns:
singleton

defaultCase

public ClassPoolInfo defaultCase(APoolInfo host,
                                 java.lang.Object o)
All other cases throw.

Specified by:
defaultCase in class ADefaultPoolInfoVisitor<APoolInfo,java.lang.Object>
Parameters:
host - non-class host
o - not used
Returns:
nothing

classCase

public APoolInfo classCase(ClassPoolInfo host,
                           java.lang.Object o)
Return host.

Specified by:
classCase in interface IPoolInfoVisitor<APoolInfo,java.lang.Object>
Overrides:
classCase in class ADefaultPoolInfoVisitor<APoolInfo,java.lang.Object>
Parameters:
host - class host
o - not used
Returns:
host

emptyCase

public APoolInfo emptyCase(EmptyPoolInfo host,
                           java.lang.Object o)
Return host.

Specified by:
emptyCase in interface IPoolInfoVisitor<APoolInfo,java.lang.Object>
Overrides:
emptyCase in class ADefaultPoolInfoVisitor<APoolInfo,java.lang.Object>
Parameters:
host - empty info
o - not used
Returns:
host