本文整理了Java中java.io.ObjectOutputStream.annotateClass()
方法的一些代码示例,展示了ObjectOutputStream.annotateClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.annotateClass()
方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:annotateClass
[英]Writes optional information for class aClass to the output stream. This optional data can be read when deserializing the class descriptor (ObjectStreamClass) for this class from an input stream. By default, no extra data is saved.
[中]将类aClass的可选信息写入输出流。从输入流反序列化此类的类描述符(ObjectStreamClass)时,可以读取此可选数据。默认情况下,不会保存额外的数据。
代码示例来源:origin: org.netbeans.api/org-openide-util
protected void annotateClass(Class cl) throws IOException {
super.annotateClass(cl);
代码示例来源:origin: robovm/robovm
annotateClass(classToWrite);
代码示例来源:origin: robovm/robovm
annotateClass(classToWrite);
代码示例来源:origin: org.jboss.aop/jboss-aop
/**
* @throws java.io.IOException Any exception thrown by the underlying OutputStream.
*/
protected void annotateClass(Class<?> cl) throws IOException
{
super.annotateClass(cl);
}
代码示例来源:origin: org.jboss/jboss-common-core
/**
* @throws java.io.IOException Any exception thrown by the underlying OutputStream.
*/
protected void annotateClass(Class<?> cl) throws IOException
{
super.annotateClass(cl);
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-server
/**
* @throws IOException Any exception thrown by the underlying OutputStream.
*/
protected void annotateClass(Class cl) throws IOException
{
super.annotateClass(cl);
}
代码示例来源:origin: jboss.remoting/jboss-remoting
/**
* @throws java.io.IOException Any exception thrown by the underlying OutputStream.
*/
protected void annotateClass(Class cl) throws IOException
{
super.annotateClass(cl);
}
代码示例来源:origin: jenkinsci/remoting
@Override
protected void annotateClass(Class<?> c) throws IOException {
check(c);
super.annotateClass(c);
}
};
代码示例来源:origin: jenkinsci/remoting
@Override
protected void annotateClass(Class<?> c) throws IOException {
AnonymousClassWarnings.check(c);
super.annotateClass(c);
}
}) {
代码示例来源:origin: jasperreports/jasperreports
protected void annotateClass(Class clazz) throws IOException
{
super.annotateClass(clazz);
ClassLoader classLoader = clazz.getClassLoader();
int loaderIdx;
if (clazz.isPrimitive()
|| classLoader == null
|| isAncestorClassLoader(classLoader))
{
loaderIdx = CLASSLOADER_IDX_NOT_SET;
}
else
{
Integer idx = (Integer) classLoadersIndexes.get(classLoader);
if (idx == null)
{
idx = new Integer(classLoadersList.size());
classLoadersIndexes.put(classLoader, idx);
classLoadersList.add(classLoader);
}
loaderIdx = idx.intValue();
}
writeShort(loaderIdx);
}
}
代码示例来源:origin: in.jlibs/org-openide-util
protected void annotateClass(Class cl) throws IOException {
super.annotateClass(cl);
代码示例来源:origin: uk.gov.nationalarchives.thirdparty.netbeans/org-openide-util
protected void annotateClass(Class cl) throws IOException {
super.annotateClass(cl);
代码示例来源:origin: MobiVM/robovm
annotateClass(classToWrite);
代码示例来源:origin: ibinti/bugvm
annotateClass(classToWrite);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
annotateClass(classToWrite);
代码示例来源:origin: com.jtransc/jtransc-rt
annotateClass(classToWrite);
代码示例来源:origin: com.gluonhq/robovm-rt
annotateClass(classToWrite);
代码示例来源:origin: com.bugvm/bugvm-rt
annotateClass(classToWrite);
代码示例来源:origin: org.apidesign.bck2brwsr/emul
/**
* Writes class descriptor representing a standard (i.e., not a dynamic
* proxy) class to stream.
*/
private void writeNonProxyDesc(ObjectStreamClass desc, boolean unshared)
throws IOException
{
bout.writeByte(TC_CLASSDESC);
handles.assign(unshared ? null : desc);
if (protocol == PROTOCOL_VERSION_1) {
// do not invoke class descriptor write hook with old protocol
desc.writeNonProxy(this);
} else {
writeClassDescriptor(desc);
}
Class cl = desc.forClass();
bout.setBlockDataMode(true);
annotateClass(cl);
bout.setBlockDataMode(false);
bout.writeByte(TC_ENDBLOCKDATA);
writeClassDesc(desc.getSuperDesc(), false);
}
代码示例来源:origin: jtulach/bck2brwsr
/**
* Writes class descriptor representing a standard (i.e., not a dynamic
* proxy) class to stream.
*/
private void writeNonProxyDesc(ObjectStreamClass desc, boolean unshared)
throws IOException
{
bout.writeByte(TC_CLASSDESC);
handles.assign(unshared ? null : desc);
if (protocol == PROTOCOL_VERSION_1) {
// do not invoke class descriptor write hook with old protocol
desc.writeNonProxy(this);
} else {
writeClassDescriptor(desc);
}
Class cl = desc.forClass();
bout.setBlockDataMode(true);
annotateClass(cl);
bout.setBlockDataMode(false);
bout.writeByte(TC_ENDBLOCKDATA);
writeClassDesc(desc.getSuperDesc(), false);
}
内容来源于网络,如有侵权,请联系作者删除!