Package net.md_5.specialsource
Class AccessMap
java.lang.Object
net.md_5.specialsource.AccessMap
Access mapper - for modifying access flags on symbols
Supports loading _at.cfg files in the following format:
- comments beginning with '#' extending to end of line
- symbol pattern, space, then access changes
foo class foo/bar field foo/bar ()desc method foo/* fields in class foo/* ()desc methods in class * all classes */* all fields */*() all methods ** all classes, fields, and methodsInternal ('/') and source ('.') conventions are accepted, and the space preceding the method descriptor is optional. Access change format: visibility (required) + access flags
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccessApplied(String key, int oldAccess, int newAccess) Called when an access mapping is applied.voidaddAccessChange(String line) voidaddAccessChange(String symbolString, String accessString) voidaddAccessChange(String key, AccessChange accessChange) intapplyClassAccess(String className, int access) intapplyFieldAccess(String className, String fieldName, int access) intapplyMethodAccess(String className, String methodName, String methodDesc, int access) static StringConvert a symbol name pattern from AT config to internal formatvoidloadAccessTransformer(BufferedReader reader) voidloadAccessTransformer(File file) voidloadAccessTransformer(String filename) Load an access transformer into this AccessMap.
-
Constructor Details
-
AccessMap
public AccessMap()
-
-
Method Details
-
loadAccessTransformer
- Throws:
IOException
-
loadAccessTransformer
- Throws:
IOException
-
loadAccessTransformer
Load an access transformer into this AccessMap.- Parameters:
filename- Location of AT data, one of: - local filename - remote HTTP URL - "pattern:" followed by one transformer line- Throws:
IOException
-
convertSymbolPattern
Convert a symbol name pattern from AT config to internal format -
addAccessChange
-
addAccessChange
-
addAccessChange
-
applyClassAccess
-
applyFieldAccess
-
applyMethodAccess
-
accessApplied
Called when an access mapping is applied.- Parameters:
key- the key which caused the mapping to be matched and appliedoldAccess- the access which was replacednewAccess- the new access which was applied by the mapping
-