Package edu.umd.cs.findbugs.ba.obl
Class ObligationFactory
java.lang.Object
edu.umd.cs.findbugs.ba.obl.ObligationFactory
Factory for Obligation and ObligationSet objects to be used in an instance of
ObligationAnalysis.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddObligation
(String className) int
getObligationById
(int id) getObligationByName
(String className) getObligationByType
(ClassDescriptor classDescriptor) Look up an Obligation by type.getObligationByType
(org.apache.bcel.generic.ObjectType type) Look up an Obligation by type.getParameterObligationTypes
(XMethod xmethod) Get array of Obligation types corresponding to the parameters of the given method.boolean
isObligationType
(ClassDescriptor classDescriptor) Determine whether class named by given ClassDescriptor is an Obligation type.Get an Iterator over known Obligation types.boolean
-
Constructor Details
-
ObligationFactory
public ObligationFactory()
-
-
Method Details
-
getMaxObligationTypes
public int getMaxObligationTypes() -
signatureInvolvesObligations
-
isObligationType
Determine whether class named by given ClassDescriptor is an Obligation type.- Parameters:
classDescriptor
- a class- Returns:
- true if the class is an Obligation type, false otherwise
-
obligationIterator
Get an Iterator over known Obligation types.- Returns:
- Iterator over known Obligation types
-
getObligationByType
@CheckForNull public Obligation getObligationByType(org.apache.bcel.generic.ObjectType type) throws ClassNotFoundException Look up an Obligation by type. This returns the first Obligation that is a supertype of the type given (meaning that the given type could be an instance of the returned Obligation).- Parameters:
type
- a type- Returns:
- an Obligation that is a supertype of the given type, or null if there is no such Obligation
- Throws:
ClassNotFoundException
-
getObligationByType
Look up an Obligation by type. This returns the first Obligation that is a supertype of the type given (meaning that the given type could be an instance of the returned Obligation).- Parameters:
classDescriptor
- a ClassDescriptor naming a class type- Returns:
- an Obligation that is a supertype of the given type, or null if there is no such Obligation
-
getParameterObligationTypes
Get array of Obligation types corresponding to the parameters of the given method.- Parameters:
xmethod
- a method- Returns:
- array of Obligation types for each of the method's parameters; a null element means the corresponding parameter is not an Obligation type
-
addObligation
-
getObligationById
-
getObligationByName
-
createObligationSet
-