FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba.obl
Class ObligationFactory

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.obl.ObligationFactory

public class ObligationFactory
extends java.lang.Object

Factory for Obligation and ObligationSet objects to be used in an instance of ObligationAnalysis.


Constructor Summary
ObligationFactory()
           
 
Method Summary
 Obligation addObligation(java.lang.String className)
           
 ObligationSet createObligationSet()
           
 int getMaxObligationTypes()
           
 Obligation getObligationById(int id)
           
 Obligation getObligationByName(java.lang.String className)
           
 Obligation getObligationByType(ClassDescriptor classDescriptor)
          Look up an Obligation by type.
 Obligation getObligationByType(org.apache.bcel.generic.ObjectType type)
          Look up an Obligation by type.
 Obligation[] 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.
 java.util.Iterator<Obligation> obligationIterator()
          Get an Iterator over known Obligation types.
 boolean signatureInvolvesObligations(java.lang.String sig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObligationFactory

public ObligationFactory()
Method Detail

getMaxObligationTypes

public int getMaxObligationTypes()

signatureInvolvesObligations

public boolean signatureInvolvesObligations(java.lang.String sig)

isObligationType

public boolean isObligationType(ClassDescriptor classDescriptor)
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

public java.util.Iterator<Obligation> 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 java.lang.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:
java.lang.ClassNotFoundException

getObligationByType

@CheckForNull
public Obligation getObligationByType(ClassDescriptor classDescriptor)
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
Throws:
java.lang.ClassNotFoundException

getParameterObligationTypes

public Obligation[] getParameterObligationTypes(XMethod xmethod)
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

public Obligation addObligation(@DottedClassName
                                java.lang.String className)

getObligationById

public Obligation getObligationById(int id)

getObligationByName

public Obligation getObligationByName(@DottedClassName
                                      java.lang.String className)

createObligationSet

public ObligationSet createObligationSet()

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.