code: public static ObjectStreamClass lookup(Class<?> cl) {
          ObjectStreamClass osc = lookupStreamClass(cl);
          return (osc.isSerializable() || osc.isExternalizable()) ? osc : null;
      }
docs: Returns the descriptor for a serializable class.
  Returns null if the class doesn't implement {@code Serializable} or {@code Externalizable}.
  
  @param cl
  a java.lang.Class for which to obtain the corresponding
  descriptor
  @return the corresponding descriptor if the class is serializable or
  externalizable; null otherwise.