ClassReferencePointer (@NotNull PsiJavaCodeReferenceElement ref) { return new ClassReferencePointer() { @NotNull @Override public PsiJavaCodeReferenceElement retrieveReference() { return ref; } @NotNull @Override public PsiJavaCodeReferenceElement retrieveNonNullReference() { return ref; } }; }