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

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

public class CheckNameAndTypeVisitor
extends ADefaultPoolInfoVisitor<NameAndTypePoolInfo,java.lang.Object>

Check that the host is a name-and-type info.

Author:
Mathias Ricken

Field Summary
private static CheckNameAndTypeVisitor _instance
          Singleton instance.
 
Constructor Summary
private CheckNameAndTypeVisitor()
          Singleton constructor.
 
Method Summary
 NameAndTypePoolInfo defaultCase(APoolInfo host, java.lang.Object o)
          All other cases throw.
 NameAndTypePoolInfo nameAndTypeCase(NameAndTypePoolInfo host, java.lang.Object o)
          Case for name and type info.
static CheckNameAndTypeVisitor singleton()
          Singleton accessor.
 
Methods inherited from class edu.rice.cs.cunit.classFile.constantPool.visitors.ADefaultPoolInfoVisitor
asciizCase, classCase, doubleCase, emptyCase, fieldCase, floatCase, intCase, interfaceMethodCase, longCase, methodCase, 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 CheckNameAndTypeVisitor _instance
Singleton instance.

Constructor Detail

CheckNameAndTypeVisitor

private CheckNameAndTypeVisitor()
Singleton constructor.

Method Detail

singleton

public static CheckNameAndTypeVisitor singleton()
Singleton accessor.

Returns:
singleton

defaultCase

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

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

nameAndTypeCase

public NameAndTypePoolInfo nameAndTypeCase(NameAndTypePoolInfo host,
                                           java.lang.Object o)
Case for name and type info.

Specified by:
nameAndTypeCase in interface IPoolInfoVisitor<NameAndTypePoolInfo,java.lang.Object>
Overrides:
nameAndTypeCase in class ADefaultPoolInfoVisitor<NameAndTypePoolInfo,java.lang.Object>
Parameters:
host - name and type info
o - not used
Returns:
visitor-specific return value