Interface IFunctionClassificationStrategy

All Known Implementing Classes:
AbstractFunctionClassificationStrategy, AbstractLibraryCallFunctionClassificationStrategy, BasicFunctionClassificationStrategy, EJBFunctionClassificationStrategy

public interface IFunctionClassificationStrategy
Interface for the function call classification strategy. Implementing classes are used by the FunctionCallClassificationVisitor to decide which statements are external calls, internal calls, and library calls
  • Method Summary

    Modifier and Type
    Method
    Description
    classifySimpleStatement(org.emftext.language.java.statements.Statement object)
    Given a simple statement there are four options what it could mean: an internal calculation, an internal method call, an external call or a call to a library function.
    void
    mergeFunctionCallType(BitSet typeToUpdate, Collection<BitSet> typeInfosToMerge)
    Update the passed type with the type info to be merged into the existing type.
  • Method Details

    • mergeFunctionCallType

      void mergeFunctionCallType(BitSet typeToUpdate, Collection<BitSet> typeInfosToMerge)
      Update the passed type with the type info to be merged into the existing type. This method is used to calculate the annotations of control flow nodes which have child elements like loops and branches. For example, if a loop has a child statement which is an external call the loops annotation should be updated to indicate that itself should be treated as containing an external call
      Parameters:
      typeToUpdate - The type flags into which the new type flags should be merged into
      typeInfosToMerge - The type flags of one of the child nodes in the GAST to be merged into the parent node
    • classifySimpleStatement

      List<BitSet> classifySimpleStatement(org.emftext.language.java.statements.Statement object)
      Given a simple statement there are four options what it could mean: an internal calculation, an internal method call, an external call or a call to a library function. This method is used to decide on the type of the simple statement
      Parameters:
      object - The simple statement to be classified
      Returns:
      A BitSet where the flags indicate the type of the statement. See FunctionCallClassificationVisitor for details on this.