All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gwt.reflect.shared.ClassMap Maven / Gradle / Ivy

The newest version!
package com.google.gwt.reflect.shared;

import com.google.gwt.core.client.JavaScriptObject;

import java.lang.reflect.Method;
import java.security.ProtectionDomain;

/**
 * This is the abstract base class used to encapsulate runtime reflection data
 * for enhanced classes.
 * 

* This class includes some specific, common containers, like enclosing classes * or methods, any inner classes or interfaces, the protection domain, and a * {@link #newInstance()} method. * * @author James X. Nelson ([email protected], @james) * @param */ public abstract class ClassMap { protected static native void remember(int constId, ClassMap cls) /*-{ $wnd.GwtReflect.$[constId] = cls; }-*/; public JavaScriptObject ifaces = JavaScriptObject.createArray(); public JavaScriptObject classes = JavaScriptObject.createArray(); private Method enclosingMethod; private Class enclosingClass; public native void addClass(Class cls, JavaScriptObject into) /*-{ into[into.length] = cls; }-*/; public final Class[] getDeclaredClasses() { return ReflectUtil.getRawClasses(classes); } public Class getEnclosingClass() { return enclosingClass; } public Method getEnclosingMethod() { return enclosingMethod; } public final Class[] getInterfaces() { return ReflectUtil.getRawClasses(ifaces); } public ProtectionDomain getProtectionDomain() { return null; } public T newInstance() { throw new UnsupportedOperationException(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy