|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.xact.analysis.soot.TranslatorUtil
public class TranslatorUtil
Utility methods used in flow graph construction.
Constructor Summary | |
---|---|
TranslatorUtil(TranslatorContext con)
Constructs a new translator utilities object for the given context. |
Method Summary | |
---|---|
String |
expandQName(String qname)
Expands a QName according to the current namespace declarations. |
Map<String,String> |
expandQNames(Map<String,String> qnames)
Expands a QName map according to the current namespace declarations. |
Variable |
getAliasVar()
Returns the global alias variable for non-application XML data. |
dk.brics.automaton.Automaton |
getAutomatonFromObjectExp(ValueBox b)
Returns an automaton representing the possible string values of the given Soot expression. |
dk.brics.automaton.Automaton |
getAutomatonFromStringExp(ValueBox b)
Returns an automaton representing the possible string values of the given Soot string expression. |
Origin |
getConstantOrigin(Value v)
Returns the origin constant value for the given Soot value. |
String |
getConstantString(Value v)
Returns the string constant value for the given Soot value. |
TranslatorContext |
getContext()
Returns the context object. |
int |
getLineNumber(Stmt s)
Gets a source line number for the given Soot statement. |
String |
getResourceString(String name)
Retrieves a resource string using the current class loader. |
String |
getTypeAnnotation(SootMethod m)
Returns the Type annotation for a method return, or null if not present. |
Variable |
getVar(Value v)
Returns a flow graph variable for the given Soot value. |
Variable |
getVariableFromObjectExp(ValueBox b)
Returns a flow graph variable representing the possible XML values of the given Soot expression. |
boolean |
isXMLType(Type t)
Checks whether the given type is XML or related (i.e. can have a Type annotation). |
void |
setStatementBuilder(StatementBuilder stm)
Sets the StatementBuilder . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TranslatorUtil(TranslatorContext con)
Method Detail |
---|
public String expandQName(String qname)
public Map<String,String> expandQNames(Map<String,String> qnames)
public Variable getAliasVar()
public dk.brics.automaton.Automaton getAutomatonFromObjectExp(ValueBox b)
ToXMLable
.
public dk.brics.automaton.Automaton getAutomatonFromStringExp(ValueBox b)
public Origin getConstantOrigin(Value v)
XMLAnalysisException
- if the value does not appear to be a constant originpublic String getConstantString(Value v)
XMLAnalysisException
- if the value does not appear to be a constant stringpublic TranslatorContext getContext()
public int getLineNumber(Stmt s)
public String getResourceString(String name)
public String getTypeAnnotation(SootMethod m)
public Variable getVar(Value v)
makeVariable(Value, String)
.
public Variable getVariableFromObjectExp(ValueBox b)
ToXMLable
, an assignment is added from
a call to toXML
on the value to the new variable.
Returns null is the input type is NullType
.
public boolean isXMLType(Type t)
public void setStatementBuilder(StatementBuilder stm)
StatementBuilder
.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |