Package org.apache.bcel.verifier
Class VerifierFactory
java.lang.Object
org.apache.bcel.verifier.VerifierFactory
This class produces instances of the Verifier class. Its purpose is to make
sure that they are singleton instances with respect to the class name they
operate on. That means, for every class (represented by a unique fully qualified
class name) there is exactly one Verifier.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe HashMap that holds the data about the already-constructed Verifier instances.private static final List<VerifierFactoryObserver>
The VerifierFactoryObserver instances that observe the VerifierFactory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds the VerifierFactoryObserver o to the list of observers.static void
Removes the VerifierFactoryObserver o from the list of observers.static Verifier
getVerifier
(String fullyQualifiedClassName) Returns the (only) verifier responsible for the class with the given name.static Verifier[]
Returns all Verifier instances created so far.private static void
Notifies the observers of a newly generated Verifier.
-
Field Details
-
hashMap
The HashMap that holds the data about the already-constructed Verifier instances. -
observers
The VerifierFactoryObserver instances that observe the VerifierFactory.
-
-
Constructor Details
-
VerifierFactory
private VerifierFactory()The VerifierFactory is not instantiable.
-
-
Method Details
-
getVerifier
Returns the (only) verifier responsible for the class with the given name. Possibly a new Verifier object is transparently created.- Returns:
- the (only) verifier responsible for the class with the given name.
-
notify
Notifies the observers of a newly generated Verifier. -
getVerifiers
Returns all Verifier instances created so far. This is useful when a Verifier recursively lets the VerifierFactory create other Verifier instances and if you want to verify the transitive hull of referenced class files. -
attach
Adds the VerifierFactoryObserver o to the list of observers. -
detach
Removes the VerifierFactoryObserver o from the list of observers.
-