@Override public boolean isBlacklisted(Class c) { AnonymousClassWarnings.check(c); return false; }
@Override protected void annotateClass(Class<?> c) throws IOException { check(c); super.annotateClass(c); } };
@Override protected void annotateClass(Class<?> c) throws IOException { AnonymousClassWarnings.check(c); super.annotateClass(c); } }) {
@Override protected void annotateClass(Class<?> c) throws IOException { AnonymousClassWarnings.check(c); ClassLoader cl = c.getClassLoader(); if (cl==null) {// bootstrap classloader. no need to export. writeInt(TAG_SYSTEMCLASSLOADER); return; } Integer idx = classLoaders.get(cl); if (idx==null) { classLoaders.put(cl,classLoaders.size()); if (cl instanceof RemoteClassLoader) { int oid = ((RemoteClassLoader) cl).getOid(channel); if (oid>=0) { // this classloader came from where we are sending this classloader to. writeInt(TAG_LOCAL_CLASSLOADER); writeInt(oid); return; } } // tell the receiving side that they need to import a new classloader // this reference count is released when RemoteInvocationHandler backing IClassLoader is GCed on the remote node. writeInt(TAG_EXPORTED_CLASSLOADER); writeInt(RemoteClassLoader.exportId(cl,channel)); } else {// reference to a classloader that's already written writeInt(idx); } }