Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2016 Carlos Ballesteros Velasco
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.lang;
import jtransc.FastStringMap;
import jtransc.annotation.JTranscKeep;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Objects;
import java.lang.AnnotatedElement;
public final class Class implements java.io.Serializable, Type, GenericDeclaration, AnnotatedElement {
private static final int ANNOTATION = 0x00002000;
private static final int ENUM = 0x00004000;
private static final int SYNTHETIC = 0x00001000;
// Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object. This includes public, protected, default (package) access, and private fields, but excludes inherited fields. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the class or interface declares no fields, or if this Class object represents a primitive type, an array class, or void.
// Returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object. This includes public, protected, default (package) access, and private fields, but excludes inherited fields. The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the class or interface declares no fields, or if this Class object represents a primitive type, an array class, or void.
native public Field[] getDeclaredFields() throws SecurityException;
native public Method[] getDeclaredMethods() throws SecurityException;
native public Constructor>[] getDeclaredConstructors() throws SecurityException;
native public Class super T> getSuperclass();
native public Class>[] getInterfaces();
native public Annotation[] getDeclaredAnnotations();
native public int getModifiers();
native public T newInstance() throws InstantiationException, IllegalAccessException;
native public Class>[] getDeclaredClasses() throws SecurityException;
native public Method getEnclosingMethod();
native public Constructor> getEnclosingConstructor() throws SecurityException;
native public java.net.URL getResource(String name);
public native boolean isInstance(Object obj);
native public InputStream getResourceAsStream(String name);
public ClassLoader getClassLoader() {
return _ClassInternalUtils.getSystemClassLoader();
}
native public TypeVariable>[] getTypeParameters();
native public Type getGenericSuperclass();
native public Package getPackage();
native public Type[] getGenericInterfaces();
public native Class> getComponentType();
public native Object[] getSigners();
native public Class> getDeclaringClass() throws SecurityException;
native public Class> getEnclosingClass() throws SecurityException;
native public Class>[] getClasses();
//native public java.security.ProtectionDomain getProtectionDomain();
@JTranscKeep
private Class() {
}
@JTranscKeep
private String name;
@JTranscKeep
private boolean primitive = false;
@JTranscKeep
Class(String name) throws ClassNotFoundException {
this.name = name;
this.primitive = false;
if (!_check()) throw new ClassNotFoundException("Can't find class " + name);
}
@JTranscKeep
Class(String name, boolean primitive) {
this.name = name;
this.primitive = primitive;
}
@JTranscKeep
native private boolean _check();
@JTranscKeep
public String getName() {
return this.name;
}
@JTranscKeep
static Class> getPrimitiveClass(String name) {
return new Class