equal
deleted
inserted
replaced
1547 |
1547 |
1548 public void setLazyConstValue(final Env<AttrContext> env, |
1548 public void setLazyConstValue(final Env<AttrContext> env, |
1549 final Attr attr, |
1549 final Attr attr, |
1550 final JCVariableDecl variable) |
1550 final JCVariableDecl variable) |
1551 { |
1551 { |
1552 setData(new Callable<Object>() { |
1552 setData((Callable<Object>)() -> attr.attribLazyConstantValue(env, variable, type)); |
1553 public Object call() { |
|
1554 return attr.attribLazyConstantValue(env, variable, type); |
|
1555 } |
|
1556 }); |
|
1557 } |
1553 } |
1558 |
1554 |
1559 /** |
1555 /** |
1560 * The variable's constant value, if this is a constant. |
1556 * The variable's constant value, if this is a constant. |
1561 * Before the constant value is evaluated, it points to an |
1557 * Before the constant value is evaluated, it points to an |
1854 */ |
1850 */ |
1855 public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult) { |
1851 public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult) { |
1856 return implementation(origin, types, checkResult, implementation_filter); |
1852 return implementation(origin, types, checkResult, implementation_filter); |
1857 } |
1853 } |
1858 // where |
1854 // where |
1859 public static final Filter<Symbol> implementation_filter = new Filter<Symbol>() { |
1855 public static final Filter<Symbol> implementation_filter = s -> |
1860 public boolean accepts(Symbol s) { |
1856 s.kind == MTH && (s.flags() & SYNTHETIC) == 0; |
1861 return s.kind == MTH && |
|
1862 (s.flags() & SYNTHETIC) == 0; |
|
1863 } |
|
1864 }; |
|
1865 |
1857 |
1866 public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult, Filter<Symbol> implFilter) { |
1858 public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult, Filter<Symbol> implFilter) { |
1867 MethodSymbol res = types.implementation(this, origin, checkResult, implFilter); |
1859 MethodSymbol res = types.implementation(this, origin, checkResult, implFilter); |
1868 if (res != null) |
1860 if (res != null) |
1869 return res; |
1861 return res; |