blob: 77b623ac3dc8e295b84d0be7f436bcf61efb9ca6 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package java.net;
import java.lang.reflect.AccessibleObject;
import java.util.Collection;
import java.util.Iterator;
public class SetAccessible implements Collection<AccessibleObject> {
// playing tricks to get around reflecting in java.net package on java 9
@Override
public boolean add(AccessibleObject e) {
e.setAccessible(true);
return true;
}
@Override
public int size() {
return 0;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean contains(Object o) {
return false;
}
@Override
public Iterator<AccessibleObject> iterator() {
return null;
}
@Override
public Object[] toArray() {
return null;
}
@Override
public <T> T[] toArray(T[] a) {
return null;
}
@Override
public boolean remove(Object o) {
return false;
}
@Override
public boolean containsAll(Collection<?> c) {
return false;
}
@Override
public boolean addAll(Collection<? extends AccessibleObject> c) {
return false;
}
@Override
public boolean removeAll(Collection<?> c) {
return false;
}
@Override
public boolean retainAll(Collection<?> c) {
return false;
}
@Override
public void clear() {
// nothing
}
}