Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Type Class Reference

Inheritance diagram for Type:
[legend]
Collaboration diagram for Type:
[legend]
List of all members.

Public Methods

String getSignature ()
int getSize ()
byte getType ()
String toString ()
void apply (Switch sw)
Type merge (Type other, SootClassManager cm)
abstract String toString ()
String getSignature ()
int getSize ()
byte getType ()
String toString ()
abstract void apply (TypeSwitch sw, Object o)
boolean compatibleWith (Type type)
boolean containsValue (Object value)
Expr defaultVal ()
Object getDef ()
int getExtent ()
String getName ()
String getTypeId ()
abstract boolean isKind (int kind)
boolean isSubtypeOf (Type type)
void setName (String name)
void setTypeId (String typeId)
String typeName ()
String typeSpec ()
boolean equals (Object otherType)
abstract String getFullyQualifiedName ()
Type getType ()
boolean isValidCastingConversion (Type otherType)
boolean isValidIdentityConversion (Type otherType)
boolean isValidMethodInvocationConversion (Type otherType)
abstract boolean isValidNarrowingConversion (Type otherType)
abstract boolean isValidWideningConversion (Type otherType)
String toString ()

Static Public Methods

Type[] getArgumentTypes (String signature)
String getMethodSignature (Type return_type, Type[] arg_types)
Type getReturnType (String signature)
final Type getType (String signature) throws StringIndexOutOfBoundsException
Type toMachineType (Type t)
synchronized Type[] getArgumentTypes (String signature)
String getMethodSignature (Type return_type, Type[] arg_types)
Type getReturnType (String signature)
synchronized final Type getType (String signature) throws StringIndexOutOfBoundsException

Static Public Attributes

final BasicType VOID = new BasicType(T_VOID)
final BasicType BOOLEAN = new BasicType(T_BOOLEAN)
final BasicType INT = new BasicType(T_INT)
final BasicType SHORT = new BasicType(T_SHORT)
final BasicType BYTE = new BasicType(T_BYTE)
final BasicType LONG = new BasicType(T_LONG)
final BasicType DOUBLE = new BasicType(T_DOUBLE)
final BasicType FLOAT = new BasicType(T_FLOAT)
final BasicType CHAR = new BasicType(T_CHAR)
final ObjectType OBJECT = new ObjectType("java.lang.Object")
final ObjectType STRING = new ObjectType("java.lang.String")
final ObjectType STRINGBUFFER = new ObjectType("java.lang.StringBuffer")
final Type[] NO_ARGS = new Type[0]
final ReferenceType NULL = new ReferenceType()
final Type[] NO_ARGS = new Type[0]
final Type UNKNOWN
final Type ADDRESS
Type booleanType = new Bool()
Type defaultRangeType = new Range(DefaultValues.birMinIntRange,DefaultValues.birMaxIntRange)
final Type intType = new Range()
final Type WR_lockType = new Lock(true,true)

Protected Methods

 Type (byte t, String s)
 Type (byte t, String s)

Protected Attributes

byte type
String signature
Name name

Private Attributes

String name
String typeId
int extent = 1

Static Private Attributes

int consumed_chars = 0

Detailed Description

Abstract super class for all possible java types, namely basic types such as int, object types like String and array types, e.g. int[]

Version:
Id:
Type.java,v 1.1.1.1 2002/01/24 03:44:02 pserver Exp
Author:
M. Dahm

Definition at line 15 of file lib/jpf/de/fub/bytecode/generic/Type.java.


Member Function Documentation

boolean Type::equals Object   t [inline]
 

Returns:
boolean
Parameters:
otherType   java.lang.Object

Reimplemented in ArrayType, ObjectType, Ref, Lock, ArrayType, Collection, ArrayType, BasicType, ObjectType, Array, Bool, Enumerated, Field, Range, Record, Ref, and Ref.

Definition at line 44 of file src/edu/ksu/cis/bandera/jjjc/symboltable/Type.java.

Referenced by ObjectType::equals(), ArrayType::equals(), SootClass::getMethod(), and CFG::jimplify().

synchronized Type [] Type::getArgumentTypes String   signature [inline, static]
 

Convert arguments of a method (signature) to an array of Type objects.

Parameters:
signature   signature string such as (Ljava/lang/String;)V
Returns:
array of argument types

Definition at line 51 of file src/de/fub/bytecode/generic/Type.java.

Type [] Type::getArgumentTypes String   signature [inline, static]
 

Convert arguments of a method (signature) to an array of Type objects.

Parameters:
signature   signature string such as (Ljava/lang/String;)V
Returns:
array of argument types

Definition at line 47 of file lib/jpf/de/fub/bytecode/generic/Type.java.

abstract String Type::getFullyQualifiedName   [pure virtual]
 

Returns:
java.lang.String

Reimplemented in ArrayType.

Referenced by isValidIdentityConversion(), and ArrayType::isValidWideningConversion().

String Type::getMethodSignature Type   return_type,
Type   arg_types[]
[inline, static]
 

Convert type to Java method signature, e.g. int[] f(java.lang.String x) becomes (Ljava/lang/String;)[I

Parameters:
return_type   what the method returns
arg_types   what are the argument types
Returns:
method signature for given type(s).

Definition at line 82 of file src/de/fub/bytecode/generic/Type.java.

String Type::getMethodSignature Type   return_type,
Type   arg_types[]
[inline, static]
 

Convert type to Java method signature, e.g. int[] f(java.lang.String x) becomes (Ljava/lang/String;)[I

Parameters:
return_type   what the method returns
arg_types   what are the argument types
Returns:
method signature for given type(s).

Definition at line 78 of file lib/jpf/de/fub/bytecode/generic/Type.java.

Type Type::getReturnType String   signature [inline, static]
 

Convert arguments of a method (signature) to a Type object.

Parameters:
signature   signature string such as (Ljava/lang/String;)V
Returns:
return type

Definition at line 99 of file src/de/fub/bytecode/generic/Type.java.

Type Type::getReturnType String   signature [inline, static]
 

Convert arguments of a method (signature) to a Type object.

Parameters:
signature   signature string such as (Ljava/lang/String;)V
Returns:
return type

Definition at line 95 of file lib/jpf/de/fub/bytecode/generic/Type.java.

String Type::getSignature   [inline]
 

Returns:
signature for given type.

Definition at line 111 of file src/de/fub/bytecode/generic/Type.java.

String Type::getSignature   [inline]
 

Returns:
signature for given type.

Definition at line 107 of file lib/jpf/de/fub/bytecode/generic/Type.java.

Referenced by ArrayType::ArrayType(), ConstantPoolGen::addArrayClass(), InstructionFactory::createFieldAccess(), SlicingMethod::genNewCritForExit(), FieldGen::getField(), LocalVariableGen::getLocalVariable(), getMethodSignature(), and FieldGen::getSignature().

int Type::getSize   [inline]
 

Returns:
stack size of this type (2 for long and double, 0 for void, 1 otherwise)

Reimplemented in Array, and Collection.

Definition at line 115 of file src/de/fub/bytecode/generic/Type.java.

int Type::getSize   [inline]
 

Returns:
stack size of this type (2 for long and double, 0 for void, 1 otherwise)

Reimplemented in Array, and Collection.

Definition at line 111 of file lib/jpf/de/fub/bytecode/generic/Type.java.

Referenced by MethodGen::addLocalVariable(), InstructionFactory::createInvoke(), FieldInstruction::getFieldSize(), and MethodGen::setMaxLocals().

Type Type::getType   [inline]
 

Returns:
edu.ksu.cis.bandera.jjjc.symboltable.Type

Reimplemented in Field, and Field.

Definition at line 59 of file src/edu/ksu/cis/bandera/jjjc/symboltable/Type.java.

synchronized final Type Type::getType String   signature [inline, static]
 

Convert signature to a Type object.

Parameters:
signature   signature string such as Ljava/lang/String;
Returns:
type object

Definition at line 132 of file src/de/fub/bytecode/generic/Type.java.

byte Type::getType   [inline]
 

Returns:
type as defined in Constants

Reimplemented in Field, and Field.

Definition at line 126 of file src/de/fub/bytecode/generic/Type.java.

final Type Type::getType String   signature [inline, static]
 

Convert signature to a Type object.

Parameters:
signature   signature string such as Ljava/lang/String;
Returns:
type object

Definition at line 128 of file lib/jpf/de/fub/bytecode/generic/Type.java.

byte Type::getType   [inline]
 

Returns:
type as defined in Constants

Reimplemented in Field, and Field.

Definition at line 122 of file lib/jpf/de/fub/bytecode/generic/Type.java.

Referenced by ArrayType::ArrayType(), MethodGen::addLocalVariable(), SpinTrans::caseDerefExpr(), SmvTrans::caseDerefExpr(), Ref::computeTargetType(), InstructionFactory::createArrayLoad(), InstructionFactory::createArrayStore(), InstructionFactory::createBinaryOperation(), InstructionFactory::createCast(), InstructionFactory::createLoad(), InstructionFactory::createNull(), InstructionFactory::createReturn(), InstructionFactory::createStore(), getArgumentTypes(), getReturnType(), and getType().

boolean Type::isValidCastingConversion Type   otherType [inline]
 

Returns:
boolean
Parameters:
otherType   edu.ksu.cis.bandera.jjjc.symboltable.Type

Definition at line 67 of file src/edu/ksu/cis/bandera/jjjc/symboltable/Type.java.

boolean Type::isValidIdentityConversion Type   otherType [inline]
 

Returns:
boolean
Parameters:
otherType   edu.ksu.cis.bandera.jjjc.symboltable.Type

Definition at line 76 of file src/edu/ksu/cis/bandera/jjjc/symboltable/Type.java.

boolean Type::isValidMethodInvocationConversion Type   otherType [inline]
 

Returns:
boolean
Parameters:
otherType   edu.ksu.cis.bandera.jjjc.symboltable.Type

Definition at line 84 of file src/edu/ksu/cis/bandera/jjjc/symboltable/Type.java.

abstract boolean Type::isValidNarrowingConversion Type   otherType [pure virtual]
 

Returns:
boolean
Parameters:
otherType   edu.ksu.cis.bandera.jjjc.symboltable.Type

Reimplemented in ArrayType.

Referenced by ArrayType::isValidNarrowingConversion().

abstract boolean Type::isValidWideningConversion Type   otherType [pure virtual]
 

Returns:
boolean
Parameters:
otherType   edu.ksu.cis.bandera.jjjc.symboltable.Type

Reimplemented in ArrayType.

Referenced by ArrayType::isValidWideningConversion().

String Type::toString   [inline]
 

Returns:
java.lang.String

Reimplemented in Field, ReferenceType, Ref, ArrayType, Field, Array, Bool, Collection, Enumerated, Field, Lock, Range, Record, Ref, Field, and Ref.

Definition at line 103 of file src/edu/ksu/cis/bandera/jjjc/symboltable/Type.java.

String Type::toString   [inline]
 

Returns:
Type string, e.g. `int[]'

Reimplemented in Field, ReferenceType, Ref, ArrayType, Field, Array, Bool, Collection, Enumerated, Field, Lock, Range, Record, Ref, Field, and Ref.

Definition at line 168 of file src/de/fub/bytecode/generic/Type.java.

String Type::toString   [inline]
 

Returns:
Type string, e.g. `int[]'

Reimplemented in Field, ReferenceType, Ref, ArrayType, Field, Array, Bool, Collection, Enumerated, Field, Lock, Range, Record, Ref, Field, and Ref.

Definition at line 164 of file lib/jpf/de/fub/bytecode/generic/Type.java.

Referenced by PostProcessOnAnnotation::addCatchesToSliceSet(), PostProcess::addCatchesToSliceSet(), TypeExtractor::arrayName(), IndexMaps::getInvokeMethodForStart(), IndexMaps::lookupSootClassByThread(), and FieldGen::toString().


Member Data Documentation

final Type Type::ADDRESS [static]
 

Initial value:

 new Type(Constants.T_ADDRESS,
                                "<address>"){}

Definition at line 37 of file src/de/fub/bytecode/generic/Type.java.

final Type Type::UNKNOWN [static]
 

Initial value:

 new Type(Constants.T_UNKNOWN,
                                "<unknown object>"){}

Definition at line 35 of file src/de/fub/bytecode/generic/Type.java.

final BasicType Type::VOID = new BasicType(T_VOID) [static]
 

Predefined constants

Definition at line 21 of file src/de/fub/bytecode/generic/Type.java.


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:22:39 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001