edu.umd.cs.findbugs.ba.type
Class StandardTypeMerger
public
class
StandardTypeMerger
extends Object
implements TypeMerger, Constants, ExtendedTypes
A TypeMerger which applies standard Java semantics
when merging Types. Subclasses may override mergeReferenceTypes()
in order to implement special typing rules for reference types.
Author: David Hovemeyer
See Also: TypeMerger
Method Summary |
protected boolean | isIntegerType(byte type)
Determine if the given typecode refers to an Integer type (other than long).
|
protected boolean | isObjectType(byte type)
Determine if the given typecode refers to an Object type.
|
protected boolean | isReferenceType(byte type)
Determine if the given typecode refers to a reference type.
|
protected Type | mergeReferenceTypes(ReferenceType aRef, ReferenceType bRef)
Default implementation of merging reference types.
|
Type | mergeTypes(Type a, Type b) |
Constructor.
Parameters: lookupFailureCallback object used to report Repository lookup failures exceptionSetFactory factory for creating ExceptionSet objects
protected boolean isIntegerType(byte type)
Determine if the given typecode refers to an Integer type (other than long).
This implementation checks that the type code is T_INT, T_BYTE, T_BOOLEAN,
T_CHAR, or T_SHORT. Subclasses should override this if they have
defined new integer types with different type codes.
protected boolean isObjectType(byte type)
Determine if the given typecode refers to an Object type.
Subclasses should override with any new object types.
protected boolean isReferenceType(byte type)
Determine if the given typecode refers to a reference type.
This implementation just checks that the type code is T_OBJECT,
T_ARRAY, T_NULL, or T_EXCEPTION. Subclasses should override this
if they have defined new object types with different type codes.
protected Type mergeReferenceTypes(ReferenceType aRef, ReferenceType bRef)
Default implementation of merging reference types.
This just returns the first common superclass, which is compliant
with the JVM Spec. Subclasses may override this method
in order to implement extended type rules.
Parameters: aRef a ReferenceType bRef a ReferenceType
Returns: the merged Type
public Type mergeTypes(Type a, Type b)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.