public class TypeAnalysis extends ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>
A forward flow analysis which determines the type of each variable and stack
location in a given ClassFile.Method. In the case of a method
which is not well-typed, a verification error is reported. For valid methods,
a StackMapTable attribute is added to the Code
attribute (and any existing one replaced).
| Modifier and Type | Class and Description |
|---|---|
static class |
TypeAnalysis.VerificationException
Indicates that the bytecode being analysis is malformed in some manner.
|
| Constructor and Description |
|---|
TypeAnalysis() |
| Modifier and Type | Method and Description |
|---|---|
jasm.verifier.TypeAnalysis.Store[] |
apply(ClassFile.Method method)
Apply the analysis to a given method in a classfile.
|
void |
apply(ClassFile cf)
Apply the analysis to every method in a classfile, creating the necessary
StackMapTable attributes. |
jasm.verifier.TypeAnalysis.Store[] |
initialise(Code attr,
ClassFile.Method method)
Generate an array of stores, one for each bytecode in the given method.
|
boolean |
merge(int index,
jasm.verifier.TypeAnalysis.Store original,
jasm.verifier.TypeAnalysis.Store update)
Merge one abstract store into another to form a store at a join point in
the control-flow graph.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
boolean branch,
Bytecode.IfCmp code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
given bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
boolean branch,
Bytecode.If code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
given bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.ArrayLength code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
arraystore bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.ArrayLoad code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
arrayload bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.ArrayStore code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
arraystore bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.BinOp code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a binop bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.CheckCast code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a checkcast bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Cmp code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a cmp bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Conversion code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a convert bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Dup code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a dup bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.DupX1 code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a dup_x1 bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.DupX2 code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a dup_x2 bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.GetField code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
getfield bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Iinc code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
an iinc bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.InstanceOf code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a instanceof bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Invoke code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
invoke bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.LoadConst code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
loadconst bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Load code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
load bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.MonitorEnter code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a monitorenter bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.MonitorExit code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a monitorexit bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Neg code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a neg bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.New code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a new bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Nop code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a nop bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Pop code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a pop bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.PutField code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
arraystore bytecode to an incoming store.
|
void |
transfer(int index,
Bytecode.Return code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
return bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Store code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
store bytecode to an incoming store.
|
jasm.verifier.TypeAnalysis.Store |
transfer(int index,
Bytecode.Swap code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of
a swap bytecode to an incoming store.
|
void |
transfer(int index,
Bytecode.Throw code,
jasm.verifier.TypeAnalysis.Store store)
Generate an updated a abstract store by apply the abstract effect(s) of a
throw bytecode to an incoming store.
|
merge, selectpublic void apply(ClassFile cf)
StackMapTable attributes.cf - public jasm.verifier.TypeAnalysis.Store[] apply(ClassFile.Method method)
apply in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>method - The method to apply analysis topublic jasm.verifier.TypeAnalysis.Store[] initialise(Code attr, ClassFile.Method method)
ForwardFlowAnalysisinitialise in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>attr - code attribute being analysed.method - enclosing method.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Store code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Load code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.LoadConst code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.ArrayLoad code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.ArrayStore code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public void transfer(int index,
Bytecode.Throw code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public void transfer(int index,
Bytecode.Return code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Iinc code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.BinOp code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Neg code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.New code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
boolean branch,
Bytecode.If code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.branch - indicates the true or false branch is to be considered.code - to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
boolean branch,
Bytecode.IfCmp code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.branch - indicates the true or false branch is to be considered.code - to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.GetField code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.PutField code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.ArrayLength code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Invoke code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.CheckCast code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Conversion code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.InstanceOf code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Pop code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Dup code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.DupX1 code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.DupX2 code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Swap code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Cmp code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.Nop code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.MonitorEnter code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public jasm.verifier.TypeAnalysis.Store transfer(int index,
Bytecode.MonitorExit code,
jasm.verifier.TypeAnalysis.Store store)
ForwardFlowAnalysistransfer in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - index in bytecode array of bytecode being analysed.code - bytecode to be analysed.store - incoming abstract store.public boolean merge(int index,
jasm.verifier.TypeAnalysis.Store original,
jasm.verifier.TypeAnalysis.Store update)
ForwardFlowAnalysismerge in class ForwardFlowAnalysis<jasm.verifier.TypeAnalysis.Store>index - Index position of bytecode being analysedoriginal - Original store to join "into". In the case of no change, this
should be returned.update - New store to join "into" the original store.Copyright © 2016. All rights reserved.