|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bcel.verifier.PassVerifier
org.apache.bcel.verifier.statics.Pass2Verifier
public final class Pass2Verifier
This PassVerifier verifies a class file according to pass 2 as described in The Java Virtual Machine Specification, 2nd edition. More detailed information is to be found at the do_verify() method's documentation.
do_verify()
Nested Class Summary | |
---|---|
private class |
Pass2Verifier.CPESSC_Visitor
A Visitor class that ensures the constant pool satisfies the static constraints. |
private class |
Pass2Verifier.FAMRAV_Visitor
A Visitor class that ensures the ConstantCP-subclassed entries of the constant pool are valid. |
private static class |
Pass2Verifier.InnerClassDetector
This class serves for finding out if a given JavaClass' ConstantPool references an Inner Class. |
Field Summary | |
---|---|
private LocalVariablesInfo[] |
localVariablesInfos
The LocalVariableInfo instances used by Pass3bVerifier. |
private Verifier |
myOwner
The Verifier that created this. |
Constructor Summary | |
---|---|
Pass2Verifier(Verifier owner)
Should only be instantiated by a Verifier. |
Method Summary | |
---|---|
private void |
constant_pool_entries_satisfy_static_constraints()
Ensures that the constant pool entries satisfy the static constraints as described in The Java Virtual Machine Specification, 2nd Edition. |
VerificationResult |
do_verify()
Pass 2 is the pass where static properties of the class file are checked without looking into "Code" arrays of methods. |
private void |
every_class_has_an_accessible_superclass()
Ensures that every class has a super class and that final classes are not subclassed. |
private void |
field_and_method_refs_are_valid()
Ensures that the ConstantCP-subclassed entries of the constant pool are valid. |
private void |
final_methods_are_not_overridden()
Ensures that final methods are not overridden. |
LocalVariablesInfo |
getLocalVariablesInfo(int method_nr)
Returns a LocalVariablesInfo object containing information about the usage of the local variables in the Code attribute of the said method or null if the class file this Pass2Verifier operates on could not be pass-2-verified correctly. |
private static java.lang.String |
tostring(Node n)
This method is here to save typing work and improve code readability. |
private static boolean |
validClassMethodName(java.lang.String name)
This method returns true if and only if the supplied String represents a valid method name that may be referenced by ConstantMethodref objects. |
private static boolean |
validClassName(java.lang.String name)
This method returns true if and only if the supplied String represents a valid Java class name. |
private static boolean |
validFieldName(java.lang.String name)
This method returns true if and only if the supplied String represents a valid Java field name. |
private static boolean |
validInterfaceMethodName(java.lang.String name)
This method returns true if and only if the supplied String represents a valid Java interface method name that may be referenced by ConstantInterfaceMethodref objects. |
private static boolean |
validJavaIdentifier(java.lang.String name)
This method returns true if and only if the supplied String represents a valid Java identifier (so-called simple name). |
private static boolean |
validJavaLangMethodName(java.lang.String name)
This method returns true if and only if the supplied String represents a valid Java programming language method name stored as a simple (non-qualified) name. |
private static boolean |
validMethodName(java.lang.String name,
boolean allowStaticInit)
This method returns true if and only if the supplied String represents a valid method name. |
Methods inherited from class org.apache.bcel.verifier.PassVerifier |
---|
addMessage, getMessages, verify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private LocalVariablesInfo[] localVariablesInfos
private Verifier myOwner
Constructor Detail |
---|
public Pass2Verifier(Verifier owner)
Verifier
Method Detail |
---|
public LocalVariablesInfo getLocalVariablesInfo(int method_nr)
public VerificationResult do_verify()
do_verify
in class PassVerifier
Pass3aVerifier
private void every_class_has_an_accessible_superclass()
ClassConstraintException
- otherwise.private void final_methods_are_not_overridden()
ClassConstraintException
- otherwise.constant_pool_entries_satisfy_static_constraints()
,
every_class_has_an_accessible_superclass()
private void constant_pool_entries_satisfy_static_constraints()
ClassConstraintException
- otherwise.private void field_and_method_refs_are_valid()
ClassConstraintException
- otherwise.constant_pool_entries_satisfy_static_constraints()
private static final boolean validClassName(java.lang.String name)
private static boolean validMethodName(java.lang.String name, boolean allowStaticInit)
private static boolean validClassMethodName(java.lang.String name)
private static boolean validJavaLangMethodName(java.lang.String name)
private static boolean validInterfaceMethodName(java.lang.String name)
private static boolean validJavaIdentifier(java.lang.String name)
private static boolean validFieldName(java.lang.String name)
private static java.lang.String tostring(Node n)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |