Skip to content

Commit

Permalink
External annotations: move occurrences of ReflectionSupport in the JR…
Browse files Browse the repository at this point in the history
…E to an external annotation file.

	Change on 2019/06/18 by antoniocortes <antoniocortes@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=253865267
  • Loading branch information
antonio-cortes-perez committed Jun 21, 2019
1 parent 4383a39 commit 92cfd60
Show file tree
Hide file tree
Showing 34 changed files with 87 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package com.google.j2objc.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -31,7 +30,6 @@
* return linked in data resources as URLs, such as from Class.getResource()
* and ClassLoader.findResources().
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class ResourceDataStreamHandler extends URLStreamHandler {
private final String path;
private final byte[] data;
Expand Down
2 changes: 0 additions & 2 deletions jre_emul/Classes/java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package java.lang;

import com.google.j2objc.annotations.ReflectionSupport;
import com.google.j2objc.annotations.Weak;

import java.util.ArrayList;
Expand Down Expand Up @@ -54,7 +53,6 @@
*
* @author Tom Ball, Keith Stanger
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class Thread implements Runnable {
private static final int NANOS_PER_MILLI = 1000000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package javax.xml.namespace;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
Expand Down Expand Up @@ -63,7 +62,6 @@
* @since 1.5
*/

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class QName implements Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package java.io;

import android.system.ErrnoException;
import com.google.j2objc.annotations.ReflectionSupport;
import libcore.io.Libcore;
import static libcore.io.OsConstants.*;

Expand All @@ -28,7 +27,6 @@
* and {@link RandomAccessFile}), and then create new streams that point to the same
* file descriptor.
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public final class FileDescriptor {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/
package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.InterruptedIOException;
Expand All @@ -44,7 +43,6 @@
* @author Pavani Diwanji
*/

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
{
/* timeout value for receive() */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import com.google.j2objc.annotations.RetainedWith;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -651,7 +650,6 @@ abstract void socketSendUrgentData(int data)
public final static int SHUT_WR = 1;
}

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
class InetAddressContainer {
InetAddress addr;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;

/**
* This class represents a datagram packet.
* <p>
Expand All @@ -42,7 +40,6 @@
* @author Benjamin Renaud
* @since JDK1.0
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public final
class DatagramPacket {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.InterruptedIOException;
Expand All @@ -36,7 +35,6 @@
* @since JDK1.1
*/

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public abstract class DatagramSocketImpl implements SocketOptions {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.ObjectStreamException;
import static libcore.io.OsConstants.*;

Expand Down Expand Up @@ -85,7 +84,6 @@
* @since 1.4
*/

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public final
class Inet4Address extends InetAddress {
final static int INADDRSZ = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import com.google.j2objc.annotations.Weak;
import java.io.ObjectInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -172,7 +171,6 @@
* @since 1.4
*/

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public final
class Inet6Address extends InetAddress {
final static int INADDRSZ = 16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.ObjectStreamException;
import java.io.ObjectStreamField;
import java.io.IOException;
Expand Down Expand Up @@ -182,7 +181,6 @@
* @see java.net.InetAddress#getLocalHost()
* @since JDK1.0
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public
class InetAddress implements java.io.Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
Expand All @@ -51,7 +50,6 @@
* @see java.net.ServerSocket
* @since 1.4
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class InetSocketAddress
extends SocketAddress
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;

/**
* This class represents a Network Interface address. In short it's an
* IP address, a subnet mask and a broadcast address when the address is
Expand All @@ -36,7 +34,6 @@
* @see java.net.NetworkInterface
* @since 1.6
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class InterfaceAddress {
private InetAddress address = null;
private Inet4Address broadcast = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.util.Enumeration;
import java.util.NoSuchElementException;

Expand All @@ -39,7 +38,6 @@
*
* @since 1.4
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public final class NetworkInterface {
private String name;
private String displayName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/
package java.net;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.IOException;

/*
Expand All @@ -33,7 +32,6 @@
* @author Chris Hegarty
*/

@ReflectionSupport(value = ReflectionSupport.Level.FULL)
class PlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl
{
static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

package java.nio.channels;

import com.google.j2objc.annotations.ReflectionSupport;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import java.io.IOException;

Expand Down Expand Up @@ -107,7 +106,6 @@
* @see SelectableChannel
* @see Selector
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public abstract class SelectionKey {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

package java.sql;

import com.google.j2objc.annotations.ReflectionSupport;
import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.NoSuchElementException;
Expand All @@ -52,7 +51,6 @@
* <LI> the causal relationship, if any for this <code>SQLException</code>.
* </UL>
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class SQLException extends java.lang.Exception
implements Iterable<Throwable> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

package java.util;

import com.google.j2objc.annotations.ReflectionSupport;

import java.io.*;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.DoubleConsumer;
Expand Down Expand Up @@ -76,7 +74,6 @@
* @author Frank Yellin
* @since 1.0
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public
class Random implements java.io.Serializable {
/** use serialVersionUID from JDK 1.1 for interoperability */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

package java.util.concurrent.locks;

import com.google.j2objc.annotations.ReflectionSupport;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
Expand All @@ -60,7 +58,6 @@
* @since 1.6
* @author Doug Lea
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public abstract class AbstractQueuedLongSynchronizer
extends AbstractOwnableSynchronizer
implements java.io.Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

package java.util.concurrent.locks;

import com.google.j2objc.annotations.ReflectionSupport;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
Expand Down Expand Up @@ -288,7 +286,6 @@
* @since 1.5
* @author Doug Lea
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public abstract class AbstractQueuedSynchronizer
extends AbstractOwnableSynchronizer
implements java.io.Serializable {
Expand Down Expand Up @@ -380,7 +377,6 @@ protected AbstractQueuedSynchronizer() { }
* expert group, for helpful ideas, discussions, and critiques
* on the design of this class.
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
static final class Node {
/** Marker to indicate a node is waiting in shared mode */
static final Node SHARED = new Node();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

package java.util.concurrent.locks;

import com.google.j2objc.annotations.ReflectionSupport;

/**
* Basic thread blocking primitives for creating locks and other
* synchronization classes.
Expand Down Expand Up @@ -134,7 +132,6 @@
* }
* }}</pre>
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public class LockSupport {
private LockSupport() {} // Cannot be instantiated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,4 @@
*
* @since 1.5
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
package java.util.concurrent;

import com.google.j2objc.annotations.ReflectionSupport;
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@

package java.util.logging;

import com.google.j2objc.annotations.ReflectionSupport;
import sun.util.logging.LoggingProxy;

/**
* Implementation of LoggingProxy when java.util.logging classes exist.
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
class LoggingProxyImpl implements LoggingProxy {
static final LoggingProxy INSTANCE = new LoggingProxyImpl();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

package javax.net.ssl;

import com.google.j2objc.annotations.ReflectionSupport;
import java.io.IOException;

/**
Expand All @@ -37,7 +36,6 @@
* @since 1.4
* @author David Brownell
*/
@ReflectionSupport(value = ReflectionSupport.Level.FULL)
public
class SSLException extends IOException
{
Expand Down

0 comments on commit 92cfd60

Please sign in to comment.