Пример #1
0
 private int referenceInstance(Symbol symbol) {
   Symbol owner = symbol.owner();
   if (owner != null && owner.isMethodSymbol()) {
     // local variable, use owner of the method
     owner = owner.owner();
   }
   int result = -1;
   if (owner != null && !outerClasses.peek().equals(owner)) {
     if (symbol.isUnknown()) {
       result = atLeastOneReference.size() - 1;
     } else if (!symbol.isStatic()) {
       result = fromInstance(symbol, owner);
     }
   }
   return result;
 }
 private void addAssignment(IdentifierTree identifier) {
   Symbol reference = identifier.symbol();
   if (!reference.isUnknown()) {
     assignments.put(reference, identifier);
   }
 }