do_verify()
| Modifier and Type | Field and Description |
|---|---|
| private JavaClass | javaClass
DON'T USE THIS EVEN PRIVATELY! |
| private final Verifier | verifier
The Verifier that created this. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public VerificationResult | do_verify()
Implements abstract org. |
| private JavaClass | |
| public String[] | getMessages()
Overrides org. |
| javaClass | back to summary |
|---|---|
| private JavaClass javaClass DON'T USE THIS EVEN PRIVATELY! USE getJavaClass() INSTEAD.
| |
| verifier | back to summary |
|---|---|
| private final Verifier verifier The Verifier that created this. | |
| Pass1Verifier | back to summary |
|---|---|
| public Pass1Verifier(final Verifier verifier) Should only be instantiated by a Verifier.
| |
| do_verify | back to summary |
|---|---|
| public VerificationResult do_verify() Implements abstract org. Pass-one verification basically means loading in a class file. The Java Virtual Machine Specification is not too precise about what makes the difference between passes one and two. The answer is that only pass one is performed on a class file as long as its resolution is not requested; whereas pass two and pass three are performed during the resolution process. Only four constraints to be checked are explicitly stated by The Java Virtual Machine Specification, 2nd edition:
However, most of this is done by parsing a class file or generating a class file into BCEL's internal data structure. Therefore, all that is really done here is look up the class file from BCEL's repository. This is also motivated by the fact that some omitted things (like the check for extra bytes at the end of the class file) are handy when actually using BCEL to repair a class file (otherwise you would not be able to load it into BCEL).
| |
| getJavaClass | back to summary |
|---|---|
| private JavaClass getJavaClass() Used to load in and return the myOwner-matching JavaClass object when needed. Avoids loading in a class file when it's not really needed! | |
| getMessages | back to summary |
|---|---|
| public String[] getMessages() Overrides org. Currently this returns an empty array of String. One could parse the error messages of BCEL (written to java.lang.System.err) when loading a class file such as detecting unknown attributes or trailing garbage at the end of a class file. However, Markus Dahm does not like the idea so this method is currently useless and therefore marked as TODO.
| |