edu.rice.cs.cunit.classFile.constantPool.visitors
Class ADefaultPoolInfoVisitor<R,D>

java.lang.Object
  extended by edu.rice.cs.cunit.classFile.constantPool.visitors.ADefaultPoolInfoVisitor<R,D>
All Implemented Interfaces:
IPoolInfoVisitor<R,D>
Direct Known Subclasses:
CheckClassOrEmptyVisitor, CheckClassVisitor, CheckLongVisitor, CheckMethodVisitor, CheckNameAndTypeVisitor, CheckUTFOrEmptyVisitor, CheckUTFVisitor, GetPoolInfoSizeVisitor, NoOpPoolInfoVisitor

public abstract class ADefaultPoolInfoVisitor<R,D>
extends java.lang.Object
implements IPoolInfoVisitor<R,D>

Abstract visitor in which all cases call a default method.

Author:
Mathias Ricken

Constructor Summary
ADefaultPoolInfoVisitor()
           
 
Method Summary
 R asciizCase(ASCIIPoolInfo host, D param)
          Case for asciiz info.
 R classCase(ClassPoolInfo host, D param)
          Case for class info.
abstract  R defaultCase(APoolInfo host, D param)
          Abstract default case.
 R doubleCase(DoublePoolInfo host, D param)
          Case for double info.
 R emptyCase(EmptyPoolInfo host, D param)
          Case for empty info.
 R fieldCase(FieldPoolInfo host, D param)
          Case for field info.
 R floatCase(FloatPoolInfo host, D param)
          Case for float info.
 R intCase(IntegerPoolInfo host, D param)
          Case for int info.
 R interfaceMethodCase(InterfaceMethodPoolInfo host, D param)
          Case for interface method info.
 R longCase(LongPoolInfo host, D param)
          Case for long info.
 R methodCase(MethodPoolInfo host, D param)
          Case for method info.
 R nameAndTypeCase(NameAndTypePoolInfo host, D param)
          Case for name and type info.
 R stringCase(StringPoolInfo host, D param)
          Case for string info.
 R unicodeCase(UnicodePoolInfo host, D param)
          Case for unicode info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ADefaultPoolInfoVisitor

public ADefaultPoolInfoVisitor()
Method Detail

defaultCase

public abstract R defaultCase(APoolInfo host,
                              D param)
Abstract default case.

Parameters:
host - constant pool info item
param - visitor-specific parameter
Returns:
visitor-specific return value

emptyCase

public R emptyCase(EmptyPoolInfo host,
                   D param)
Case for empty info.

Specified by:
emptyCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - empty info
param - visitor-specific parameter
Returns:
visitor-specific return value

classCase

public R classCase(ClassPoolInfo host,
                   D param)
Case for class info.

Specified by:
classCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - class info
param - visitor-specific parameter
Returns:
visitor-specific return value

stringCase

public R stringCase(StringPoolInfo host,
                    D param)
Case for string info.

Specified by:
stringCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - string info
param - visitor-specific parameter
Returns:
visitor-specific return value

fieldCase

public R fieldCase(FieldPoolInfo host,
                   D param)
Case for field info.

Specified by:
fieldCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - field info
param - visitor-specific parameter
Returns:
visitor-specific return value

methodCase

public R methodCase(MethodPoolInfo host,
                    D param)
Case for method info.

Specified by:
methodCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - method info
param - visitor-specific parameter
Returns:
visitor-specific return value

interfaceMethodCase

public R interfaceMethodCase(InterfaceMethodPoolInfo host,
                             D param)
Case for interface method info.

Specified by:
interfaceMethodCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - interface method info info
param - visitor-specific parameter
Returns:
visitor-specific return value

nameAndTypeCase

public R nameAndTypeCase(NameAndTypePoolInfo host,
                         D param)
Case for name and type info.

Specified by:
nameAndTypeCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - name and type info
param - visitor-specific parameter
Returns:
visitor-specific return value

intCase

public R intCase(IntegerPoolInfo host,
                 D param)
Case for int info.

Specified by:
intCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - int info
param - visitor-specific parameter
Returns:
visitor-specific return value

floatCase

public R floatCase(FloatPoolInfo host,
                   D param)
Case for float info.

Specified by:
floatCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - float info
param - visitor-specific parameter
Returns:
visitor-specific return value

longCase

public R longCase(LongPoolInfo host,
                  D param)
Case for long info.

Specified by:
longCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - long info
param - visitor-specific parameter
Returns:
visitor-specific return value

doubleCase

public R doubleCase(DoublePoolInfo host,
                    D param)
Case for double info.

Specified by:
doubleCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - double info
param - visitor-specific parameter
Returns:
visitor-specific return value

asciizCase

public R asciizCase(ASCIIPoolInfo host,
                    D param)
Case for asciiz info.

Specified by:
asciizCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - asciiz info
param - visitor-specific parameter
Returns:
visitor-specific return value

unicodeCase

public R unicodeCase(UnicodePoolInfo host,
                     D param)
Case for unicode info.

Specified by:
unicodeCase in interface IPoolInfoVisitor<R,D>
Parameters:
host - unicode info
param - visitor-specific parameter
Returns:
visitor-specific return value