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

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

public class CheckClassVisitor
extends ADefaultPoolInfoVisitor<ClassPoolInfo,java.lang.Object>

Check that the host is a class info.

Author:
Mathias Ricken

Field Summary
private static CheckClassVisitor _instance
          Singleton instance.
 
Constructor Summary
private CheckClassVisitor()
          Singleton constructor.
 
Method Summary
 ClassPoolInfo classCase(ClassPoolInfo host, java.lang.Object o)
          Return host.
 ClassPoolInfo defaultCase(APoolInfo host, java.lang.Object o)
          All other cases throw.
static CheckClassVisitor singleton()
          Singleton accessor.
 
Methods inherited from class edu.rice.cs.cunit.classFile.constantPool.visitors.ADefaultPoolInfoVisitor
asciizCase, doubleCase, emptyCase, 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 CheckClassVisitor _instance
Singleton instance.

Constructor Detail

CheckClassVisitor

private CheckClassVisitor()
Singleton constructor.

Method Detail

singleton

public static CheckClassVisitor 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<ClassPoolInfo,java.lang.Object>
Parameters:
host - non-class host
o - not used
Returns:
nothing

classCase

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

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