|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configuration
The customizable settings of the analysis. This interface controls the assumptions made by the analysis and affects precision, soundness, and efficiency.
It is generally assumed that an instance ofXMLAnalysis
has its own Configuration
instance that is not shared with other analyses.
All methods can be called concurrently by threads spawned by the ExecutorService
assigned with XMLAnalysis.setExecutorService(ExecutorService)
in addition to the thread that started
the analysis with XMLAnalysis.analyze()
. A safe way around this is always
to declare all methods synchronized (though probably not the optimal solution).
StandardConfiguration
Method Summary | |
---|---|
boolean |
canCallExtern(InvokeExpr expr)
Returns true if the specified invocation may lead to a non-application class |
Collection<URL> |
getAdditionalSchemas()
Returns the locations of some additional schemas that should be accesible to the application classes. |
String |
getFieldType(SootField field,
String annotation)
Returns the type of XML allowed in the specified field. |
Set<ValueBox> |
getHotspots()
Expressions in the analyzed program whose XML graph should be available so they can be analyzed outside the XACT analysis. |
String |
getMethodParameterType(SootMethod method,
int param,
String annotation)
Returns the type of XML required by the specified method parameter, or null if any XML may be given as parameter. |
String |
getMethodReturnType(SootMethod method,
String annotation)
Returns the type of XML returned by the specified method, or null if any XML may be returned. |
boolean |
hasExternalSubtypes(SootClass clazz)
Returns true if the specified class or interface may have implementations in non-application code. |
boolean |
isExternallyCallable(SootMethod method)
Returns true if the specified method can be called from the VM or from a non-application class. |
boolean |
isNormalCollection(String qualifiedName)
Returns true if the specified non-abstract class denotes a collection that can be expected to behave as a normal collection. |
void |
modifyNamespaces(Map<String,String> namespaces)
Lets the configuration modify the namespace prefix map. |
dk.brics.automaton.Automaton |
resolveToString(SootClass clazz)
Returns the strings that may be returned by the specified type's toString method, or null if nothing special is known about the toString method. |
String |
resolveToXML(SootMethod toXmlMethod)
Models the behaviour of toXML methods declared in non-application classes. |
String |
translateSchemaLocation(String location)
Translates a schema location to another URL string (possibly the same). |
Method Detail |
---|
boolean canCallExtern(InvokeExpr expr)
expr
- an invocation expression
Collection<URL> getAdditionalSchemas()
String getFieldType(SootField field, String annotation)
field
- a fieldannotation
- the type placed with a @Type annotation, or null if no @Type annotation is present
Set<ValueBox> getHotspots()
String getMethodParameterType(SootMethod method, int param, String annotation)
method
- a non-application or application methodparam
- index of a parameter whose type is a subtype of XMLannotation
- the type placed with a @Type annotation, or null if no @Type annotation is present
String getMethodReturnType(SootMethod method, String annotation)
method
- a non-application or application method returning a subtype of XML.annotation
- the type placed with a @Type annotation, or null if no @Type annotation is present
boolean hasExternalSubtypes(SootClass clazz)
clazz
- a class or interface
boolean isExternallyCallable(SootMethod method)
method
- an application method
boolean isNormalCollection(String qualifiedName)
Collection
and List
interfaces and those added in a non-empty constructor.
Additionally, all its methods must adhere to their specifications in Collection
and List
.
qualifiedName
- fully qualified name of a non-abstract class implementing Collection
. Eg. java.util.ArrayList.
void modifyNamespaces(Map<String,String> namespaces)
namespaces
- map from namespace prefixes to namespaces. May be modified.dk.brics.automaton.Automaton resolveToString(SootClass clazz)
clazz
- a class
String resolveToXML(SootMethod toXmlMethod)
modifyNamespaces(Map)
and defined in a schema referred to by getAdditionalSchemas()
.
This method should return null if nothing is known about the method.
toXmlMethod
- a toXML method declared in a non-application class
String translateSchemaLocation(String location)
location
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |