de.unisaarland.cs.st.jerify.verifier.typestate
Class MethodCFGThrowsWorkData

java.lang.Object
  extended by de.unisaarland.cs.st.jerify.verifier.typestate.MethodCFGThrowsWorkData

public class MethodCFGThrowsWorkData
extends java.lang.Object

Encapsulates the information which exceptions are thrown, used for the construction of the control flow graph

Author:
Daniel Wand (typestate@ewand.de)

Constructor Summary
MethodCFGThrowsWorkData()
           
 
Method Summary
 void add(javax.lang.model.type.TypeMirror exception, Pair<AliasAnalysisVarHandle,TSFlowNode> information)
           
 void caught(java.util.Collection<javax.lang.model.type.TypeMirror> caughtExceptions)
          remove a collection of exception types (, because it is catch-ed somewhere, therefore not thrown anymore)
 void caught(javax.lang.model.type.TypeMirror caughtException)
          remove a certain exception type (, because it is catch-ed somewhere, therefore not thrown anymore)
 boolean containsException(javax.lang.model.type.TypeMirror excpetion)
          Check if exceptions of the passed exception type are known to be thrown
 java.util.Set<Pair<AliasAnalysisVarHandle,TSFlowNode>> getInformation(javax.lang.model.type.TypeMirror excpetion)
          Get the information about the passed exception type
 void includeThrowInformation(java.util.Map<javax.lang.model.type.TypeMirror,java.util.Set<Pair<AliasAnalysisVarHandle,TSFlowNode>>> throwsThis)
          Merge additional throws information in this structure.
 void includeThrowInformation(MethodCFGThrowsWorkData throwsThis)
          Merge additional throws information in this structure.
 java.util.Set<javax.lang.model.type.TypeMirror> thrownExceptions()
          get the Set of exception types that are known to be thrown
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodCFGThrowsWorkData

public MethodCFGThrowsWorkData()
Method Detail

includeThrowInformation

public final void includeThrowInformation(java.util.Map<javax.lang.model.type.TypeMirror,java.util.Set<Pair<AliasAnalysisVarHandle,TSFlowNode>>> throwsThis)
Merge additional throws information in this structure. Rationale See the copy-Constructor.


includeThrowInformation

public final void includeThrowInformation(MethodCFGThrowsWorkData throwsThis)
Merge additional throws information in this structure. Rationale See the copy-Constructor.


add

public final void add(javax.lang.model.type.TypeMirror exception,
                      Pair<AliasAnalysisVarHandle,TSFlowNode> information)

containsException

public final boolean containsException(javax.lang.model.type.TypeMirror excpetion)
Check if exceptions of the passed exception type are known to be thrown

Parameters:
excpetion - the exception to look up
Returns:
true if the exception is known to be thrown, false otherwise

getInformation

public final java.util.Set<Pair<AliasAnalysisVarHandle,TSFlowNode>> getInformation(javax.lang.model.type.TypeMirror excpetion)
Get the information about the passed exception type

Parameters:
excpetion - the type of exception for which information is requested
Returns:
the information from where (FlowNode) what exception (alias handle) is thrown, or null if none known

thrownExceptions

public final java.util.Set<javax.lang.model.type.TypeMirror> thrownExceptions()
get the Set of exception types that are known to be thrown

Returns:
the set of exception types that are known to be thrown

caught

public final void caught(javax.lang.model.type.TypeMirror caughtException)
remove a certain exception type (, because it is catch-ed somewhere, therefore not thrown anymore)

Parameters:
caughtException - the exception to be removed

caught

public final void caught(java.util.Collection<javax.lang.model.type.TypeMirror> caughtExceptions)
remove a collection of exception types (, because it is catch-ed somewhere, therefore not thrown anymore)

Parameters:
caughtExceptions - the exceptions to be removed