/** * Annotates the stream descriptor for the class <code>cl</code>. * * <p><code>MarshalOutputStream</code> implements this method as follows: * * <p>This method invokes {@link RMIClassLoader#getClassAnnotation * RMIClassLoader.getClassAnnotation} with <code>cl</code> to get the appropriate class * annotation string value (possibly <code>null</code>), and then it invokes this stream's * {@link #writeAnnotation writeAnnotation} method with that string to record the annotation. * * @param cl the class to annotate * @throws IOException if <code>writeAnnotation</code> throws an <code>IOException</code> * @throws NullPointerException if <code>cl</code> is <code>null</code> **/ protected void annotateClass(Class cl) throws IOException { writeAnnotation(getAnnotation(cl)); }
/** * Annotates the stream descriptor for the proxy class <code>cl</code>. * * <p><code>MarshalOutputStream</code> implements this method as follows: * * <p>This method invokes {@link RMIClassLoader#getClassAnnotation * RMIClassLoader.getClassAnnotation} with <code>cl</code> to get the appropriate class * annotation string value (possibly <code>null</code>), and then it invokes this stream's * {@link #writeAnnotation writeAnnotation} method with that string to record the annotation. * * @param cl the proxy class to annotate * @throws IOException if <code>writeAnnotation</code> throws an <code>IOException</code> * @throws NullPointerException if <code>cl</code> is <code>null</code> **/ protected void annotateProxyClass(Class cl) throws IOException { writeAnnotation(getAnnotation(cl)); }