code: public static boolean isClassFile(IJavaElement elt) {
          if (elt == null) {
              return false;
          }
          return elt instanceof IClassFile || elt instanceof ICompilationUnit;
  
      }
docs: Checks whether the given java element is a Java class file.
  
  @param elt
  The resource to check.
  @return <code>true</code> if the given resource is a class file,
  <code>false</code> otherwise.