示例#1
0
 // @VisibleForTesting
 static List<char[]> getClassChain(String binaryName) {
   ArrayList<char[]> result = new ArrayList<char[]>();
   String className = BinaryName.getClassName(binaryName);
   int idx;
   while ((idx = className.indexOf('$')) >= 0) {
     result.add(className.substring(0, idx).toCharArray());
     className = className.substring(idx + 1);
   }
   result.add(className.toCharArray());
   return result;
 }
示例#2
0
 private Set<TypeElement> getTypesToProcess(State state, RoundEnvironment roundEnv) {
   if (rootOverride == null) {
     return ElementFilter.typesIn(roundEnv.getRootElements());
   }
   Set<TypeElement> toScan = new HashSet<TypeElement>();
   for (String binaryTypeName : rootOverride) {
     TypeElement found =
         state.elements.getTypeElement(BinaryName.toSourceName(binaryTypeName.trim()));
     if (found == null) {
       state.poison(null, Messages.noSuchType(binaryTypeName));
     } else {
       toScan.add(found);
     }
   }
   rootOverride = null;
   return toScan;
 }
 private void addReference(ReferenceBinding referencedType) {
   String binaryName = CharOperation.toString(referencedType.compoundName);
   apiRefs.add(BinaryName.toSourceName(binaryName));
 }