@Override public Optional<Value> solveSymbolAsValue(String name) { if (typeSolver == null) throw new IllegalArgumentException(); if (this.getDeclaration().hasVisibleField(name)) { return Optional.of(Value.from(this.getDeclaration().getVisibleField(name))); } // then to parent return getParent().solveSymbolAsValue(name); }
@Override public Optional<Value> solveSymbolAsValue(String name, TypeSolver typeSolver) { if (typeSolver == null) throw new IllegalArgumentException(); if (this.getDeclaration().hasVisibleField(name)) { return Optional.of(Value.from(this.getDeclaration().getVisibleField(name))); } // then to parent return getParent().solveSymbolAsValue(name, typeSolver); }
@Override public Optional<Value> solveSymbolAsValue(String name, TypeSolver typeSolver) { if (typeSolver == null) throw new IllegalArgumentException(); if (this.getDeclaration().hasVisibleField(name)) { return Optional.of(Value.from(this.getDeclaration().getVisibleField(name))); } // then to parent return getParent().solveSymbolAsValue(name, typeSolver); }
@Override public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { if (typeSolver == null) throw new IllegalArgumentException(); if (this.getDeclaration().hasVisibleField(name)) { return SymbolReference.solved(this.getDeclaration().getVisibleField(name)); } // then to parent return getParent().solveSymbol(name, typeSolver); }
@Override public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, TypeSolver typeSolver) { if (typeSolver == null) throw new IllegalArgumentException(); if (this.getDeclaration().hasVisibleField(name)) { return SymbolReference.solved(this.getDeclaration().getVisibleField(name)); } // then to parent return getParent().solveSymbol(name, typeSolver); }
@Override public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name) { if (typeSolver == null) throw new IllegalArgumentException(); if (this.getDeclaration().hasVisibleField(name)) { return SymbolReference.solved(this.getDeclaration().getVisibleField(name)); } // then to parent return getParent().solveSymbol(name); }