ElementPattern<T> () { if (myCompiledPattern == null) { ElementPattern<?> result; try { result = compile(); } catch (Throwable throwable) { onCompilationFailed(null, toString(), throwable); result = ALWAYS_FALSE; } //noinspection unchecked myCompiledPattern = (ElementPattern<T>)result; } return myCompiledPattern; }