Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.type
Class IntegerType

java.lang.Object
  extended bynet.sf.jode.type.Type
      extended bynet.sf.jode.type.IntegerType

public class IntegerType
extends Type

This is a type class for 16 bit integral types. There are seven different types, namely int, char, short, byte, boolean, const short, const byte abbreviated I, C, S, B, Z, cS, cB. cB and cS specify constant ints whose value is in byte resp. short range. They may be converted to B resp. S, but sometimes need an explicit cast.

Author:
Jochen Hoenicke

Field Summary
static int IT_B
           
static int IT_C
           
static int IT_cB
           
static int IT_cS
           
static int IT_I
           
static int IT_S
           
static int IT_Z
           
 
Fields inherited from class net.sf.jode.type.Type
EMPTY_IFACES, tBoolByte, tBoolean, tBoolInt, tBoolUInt, tByte, TC_ARRAY, TC_BOOLEAN, TC_BYTE, TC_CHAR, TC_CLASS, TC_CLASSIFACE, TC_DOUBLE, TC_ERROR, TC_FLOAT, TC_INT, TC_INTEGER, TC_LONG, TC_METHOD, TC_NULL, TC_RANGE, TC_SHORT, TC_SYSCLASS, TC_UNKNOWN, TC_VOID, tChar, tCloneable, tComparable, tDouble, tError, tFloat, tInt, tJavaLangClass, tLong, tNull, tObject, tSerializable, tShort, tString, tStringBuffer, tStringBuilder, tUInt, tUnknown, tUObject, tVoid
 
Constructor Summary
IntegerType(int types)
          Create a new type with the given type.
IntegerType(int types, int hints)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Type getCanonic()
          Returns the canonic type of this type set.
 java.lang.String getDefaultName()
          Generates the default name, that is the `natural' choice for local of this type.
 java.lang.Object getDefaultValue()
          Generates the default value, that is the initial value of a field of this type.
 Type getHint()
          Returns the hint type of this type set.
 Type getSubType()
          The sub types of this type.
 Type getSuperType()
          The super types of this type.
 java.lang.Class getTypeClass()
          Returns the java.lang.Class representing this type.
 java.lang.String getTypeSignature()
          Returns the type signature of this type.
 Type intersection(Type type)
          Intersect this type with another type and return the new type.
 boolean isOfType(Type type)
          Check if this and <unknown -- type&rt; are not disjunct.
 boolean isSubtypeOf(Type type)
          Returns true, if this is a sub type of type.
 boolean isValidType()
          Checks if this type represents a valid type instead of a list of minimum types.
 java.lang.String toString()
          Returns a string representation describing this type set.
 
Methods inherited from class net.sf.jode.type.Type
getCastHelper, getTypeCode, isClassType, isSubTypeOf, maybeSubTypeOf, stackSize, tArray, tClass, tClass, tMethod, tRange, tSubType, tSuperType, tSystemClass, tType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IT_Z

public static final int IT_Z
See Also:
Constant Field Values

IT_I

public static final int IT_I
See Also:
Constant Field Values

IT_C

public static final int IT_C
See Also:
Constant Field Values

IT_S

public static final int IT_S
See Also:
Constant Field Values

IT_B

public static final int IT_B
See Also:
Constant Field Values

IT_cS

public static final int IT_cS
See Also:
Constant Field Values

IT_cB

public static final int IT_cB
See Also:
Constant Field Values
Constructor Detail

IntegerType

public IntegerType(int types)
Create a new type with the given type.


IntegerType

public IntegerType(int types,
                   int hints)
Method Detail

getHint

public Type getHint()
Description copied from class: Type
Returns the hint type of this type set. This returns the singleton set containing only the `most likely' type in this set. This doesn't work for tError or tUnknown, and may lead to errors for certain range types.

Overrides:
getHint in class Type
Returns:
the hint type.

getCanonic

public Type getCanonic()
Description copied from class: Type
Returns the canonic type of this type set. The intention is, to return for each expression the type, that the java compiler would assign to this expression.

Overrides:
getCanonic in class Type
Returns:
the canonic type.

getSubType

public Type getSubType()
Description copied from class: Type
The sub types of this type.

Overrides:
getSubType in class Type
Returns:
tSubType(this).

getSuperType

public Type getSuperType()
Description copied from class: Type
The super types of this type.

Overrides:
getSuperType in class Type
Returns:
tSuperType(this).

isValidType

public boolean isValidType()
Checks if this type represents a valid type instead of a list of minimum types.

Overrides:
isValidType in class Type

isSubtypeOf

public boolean isSubtypeOf(Type type)
Returns true, if this is a sub type of type.


isOfType

public boolean isOfType(Type type)
Check if this and <unknown -- type&rt; are not disjunct.

Overrides:
isOfType in class Type
Parameters:
type - a simple type; this mustn't be a range type.
Returns:
true if this is the case.

getDefaultName

public java.lang.String getDefaultName()
Description copied from class: Type
Generates the default name, that is the `natural' choice for local of this type.

Overrides:
getDefaultName in class Type
Returns:
the default name of a local of this type.

getDefaultValue

public java.lang.Object getDefaultValue()
Description copied from class: Type
Generates the default value, that is the initial value of a field of this type.

Overrides:
getDefaultValue in class Type
Returns:
the default value of a field of this type.

getTypeSignature

public java.lang.String getTypeSignature()
Description copied from class: Type
Returns the type signature of this type. You should only call this on singleton types.

Overrides:
getTypeSignature in class Type
Returns:
the type (or method) signature of this type.

getTypeClass

public java.lang.Class getTypeClass()
Description copied from class: Type
Returns the java.lang.Class representing this type. You should only call this on singleton types.

Overrides:
getTypeClass in class Type
Returns:
the Class object representing this type.

toString

public java.lang.String toString()
Description copied from class: Type
Returns a string representation describing this type set.

Overrides:
toString in class Type
Returns:
a string representation describing this type set.

intersection

public Type intersection(Type type)
Intersect this type with another type and return the new type.

Overrides:
intersection in class Type
Parameters:
type - the other type.
Returns:
the intersection, or tError, if a type conflict happens.

equals

public boolean equals(java.lang.Object o)

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.