com.google.gwt.reflect.rebind.JvmMemberPool Maven / Gradle / Ivy
package com.google.gwt.reflect.rebind;
import com.google.gwt.core.client.JavaScriptObject;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class JvmMemberPool extends JavaScriptObject {
private final Class type;
public JvmMemberPool(final Class type) {
this.type = type;
}
public A getAnnotation(final Class annoCls) {
return type.getAnnotation(annoCls);
}
public Annotation[] getAnnotations() {
return type.getAnnotations();
}
public Annotation[] getDeclaredAnnotations() {
return type.getDeclaredAnnotations();
}
public A getDeclaredAnnotation(final Class annoCls) {
return type.getDeclaredAnnotation(annoCls);
}
public Constructor getConstructor(final Class ... params) throws NoSuchMethodException {
return type.getConstructor(params);
}
public Constructor getDeclaredConstructor(final Class ... params) throws NoSuchMethodException {
return type.getDeclaredConstructor(params);
}
@SuppressWarnings("unchecked")
public Constructor[] getConstructors() {
return (Constructor[])type.getConstructors();
}
@SuppressWarnings("unchecked")
public Constructor[] getDeclaredConstructors() {
return (Constructor[])type.getDeclaredConstructors();
}
public Field getField(final String name) throws NoSuchFieldException {
return type.getField(name);
}
public Field getDeclaredField(final String name) throws NoSuchFieldException {
return type.getDeclaredField(name);
}
public Field[] getFields() {
return type.getFields();
}
public Field[] getDeclaredFields() {
return type.getDeclaredFields();
}
public Method getMethod(final String name, final Class ... params) throws NoSuchMethodException {
return type.getMethod(name, params);
}
public Method getDeclaredMethod(final String name, final Class ... params) throws NoSuchMethodException {
return type.getDeclaredMethod(name, params);
}
public Method[] getMethods() {
return type.getMethods();
}
public Method[] getDeclaredMethods() {
return type.getDeclaredMethods();
}
@SuppressWarnings({"rawtypes", "unchecked"})
public JvmMemberPool getSuperclass() {
return new JvmMemberPool(type.getSuperclass());
}
public Class[] getInterfaces() {
return type.getInterfaces();
}
public Class[] getClasses() {
return type.getClasses();
}
public Class getType() {
return type;
}
}