Class StandardTypeMerger

    • Constructor Detail

      • StandardTypeMerger

        public StandardTypeMerger​(RepositoryLookupFailureCallback lookupFailureCallback,
                                  ExceptionSetFactory exceptionSetFactory)
        Constructor.
        Parameters:
        lookupFailureCallback - object used to report Repository lookup failures
        exceptionSetFactory - factory for creating ExceptionSet objects
    • Method Detail

      • isReferenceType

        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.
      • isObjectType

        protected boolean isObjectType​(byte type)
        Determine if the given typecode refers to an Object type. Subclasses should override with any new object types.
      • isIntegerType

        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.
      • updateExceptionSet

        private static void updateExceptionSet​(ExceptionSet exceptionSet,
                                               org.apache.bcel.generic.ObjectType type)
      • mergeReferenceTypes

        protected org.apache.bcel.generic.ReferenceType mergeReferenceTypes​(org.apache.bcel.generic.ReferenceType aRef,
                                                                            org.apache.bcel.generic.ReferenceType bRef)
                                                                     throws DataflowAnalysisException
        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
        Throws:
        DataflowAnalysisException
      • isThrowable

        private boolean isThrowable​(org.apache.bcel.generic.ReferenceType ref)