Class PermissionUtils
- java.lang.Object
-
- com.ensoftcorp.open.android.essentials.permissions.mappings.PermissionUtils
-
public class PermissionUtils extends java.lang.Object
A helper class for applying Permission protected API method tags- Author:
- Yuqing Chen, Jon Mathews, Ben Holland, Zach Lones
-
-
Constructor Summary
Constructors Constructor Description PermissionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.ensoftcorp.atlas.core.db.graph.GraphElement
tagMethod(com.ensoftcorp.atlas.core.query.Q context, java.lang.String packageName, java.lang.String className, java.lang.String methodName, java.lang.String[] parameters, java.lang.String... tags)
A method which find the methods matching the name, declarative structure, and parameters Tag the matched methods with corresponding permission tag.static com.ensoftcorp.atlas.core.db.graph.GraphElement
tagMethod(java.lang.String packageName, java.lang.String className, java.lang.String methodName, java.lang.String[] parameters, java.lang.String... tags)
A method to return the method given the universe as a context
-
-
-
Method Detail
-
tagMethod
public static com.ensoftcorp.atlas.core.db.graph.GraphElement tagMethod(com.ensoftcorp.atlas.core.query.Q context, java.lang.String packageName, java.lang.String className, java.lang.String methodName, java.lang.String[] parameters, java.lang.String... tags)
A method which find the methods matching the name, declarative structure, and parameters Tag the matched methods with corresponding permission tag.- Expected format is based on PScout mappings.
- Class names are essentially the binary names.
- Constructors are always named <init>.
- Parameters:
context
- A context from which to start searchingpackageName
- The package containing the class(es) and methodclassName
- The type name, essentially the binary name (unqualified)parameters
- fully qualified parameter type names of the methodtag
- a set of tags to apply to the method- Returns:
- the GraphElement, or null if method could not be found
-
tagMethod
public static com.ensoftcorp.atlas.core.db.graph.GraphElement tagMethod(java.lang.String packageName, java.lang.String className, java.lang.String methodName, java.lang.String[] parameters, java.lang.String... tags)
A method to return the method given the universe as a context- Parameters:
packageName
- The package containing the class(es) and methodclassName
- A String containing the classes going from outermost class to innermost class delimited by $ Assume anonymous inner classes start with a number and non-anonymous classes do not.methodName
- name of the methodparameters
- array containing fully qualified name of parameter types for the methodtags
- a set of tags to apply to the method- Returns:
-
-