|
GWT 2.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.requestfactory.server.RequestFactoryInterfaceValidator
@Deprecated public class RequestFactoryInterfaceValidator
Encapsulates validation logic to determine if a RequestFactory
interface, its RequestContext
, and associated EntityProxy
interfaces match their domain counterparts. This implementation examines the
classfiles directly in order to avoid the need to load the types into the
JVM.
This class is amenable to being used as a unit test:
public void testRequestFactory() { Logger logger = Logger.getLogger(""); RequestFactoryInterfaceValidator v = new RequestFactoryInterfaceValidator( logger, new ClassLoaderLoader(MyRequestContext.class.getClassLoader())); v.validateRequestContext(MyRequestContext.class.getName()); assertFalse(v.isPoisoned()); }This class also has a
main
method and can be used as a build-time
tool:
java -cp gwt-servlet.jar:your-code.jar \ com.google.gwt.requestfactory.server.RequestFactoryInterfaceValidator \ com.example.MyRequestFactory
RequestFactory has moved to
com.google.web.bindery.requestfactory
. This package will be
removed in a future version of GWT.
Nested Class Summary | |
---|---|
static class |
RequestFactoryInterfaceValidator.ClassLoaderLoader
Deprecated. |
static interface |
RequestFactoryInterfaceValidator.Loader
Deprecated. |
Constructor Summary | |
---|---|
RequestFactoryInterfaceValidator(java.util.logging.Logger logger,
RequestFactoryInterfaceValidator.Loader loader)
Deprecated. |
Method Summary | |
---|---|
void |
antidote()
Deprecated. Reset the poisoned status of the validator so that it may be reused without destroying cached state. |
boolean |
isPoisoned()
Deprecated. Returns true if validation failed. |
static void |
main(java.lang.String[] args)
Deprecated. |
void |
validateEntityProxy(java.lang.String binaryName)
Deprecated. This method checks an EntityProxy interface against its peer domain object to determine if the server code would be able to process a request using the methods defined in the EntityProxy interface. |
void |
validateProxy(java.lang.String binaryName)
Deprecated. Determine if the specified type implements a proxy interface and apply the appropriate validations. |
void |
validateRequestContext(java.lang.String binaryName)
Deprecated. This method checks a RequestContext interface against its peer domain domain object to determine if the server code would be able to process a request using the the methods defined in the RequestContext interface. |
void |
validateRequestFactory(java.lang.String binaryName)
Deprecated. This method checks a RequestFactory interface. |
void |
validateValueProxy(java.lang.String binaryName)
Deprecated. This method checks a ValueProxy interface against its peer domain object to determine if the server code would be able to process a request using the methods defined in the ValueProxy interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestFactoryInterfaceValidator(java.util.logging.Logger logger, RequestFactoryInterfaceValidator.Loader loader)
Method Detail |
---|
public static void main(java.lang.String[] args)
public void antidote()
public boolean isPoisoned()
public void validateEntityProxy(java.lang.String binaryName)
This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs.
Checks implemented:
binaryName
implements EntityProxybinaryName
has a ProxyFor
or ProxyForName
annotation
binaryName
- the binary name (e.g. Class.getName()
) of the
EntityProxy subtypepublic void validateProxy(java.lang.String binaryName)
binaryName
- the binary name (e.g. Class.getName()
) of the
EntityProxy or ValueProxy subtypepublic void validateRequestContext(java.lang.String binaryName)
This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs.
Checks implemented:
binaryName
implements RequestContextbinaryName
has a Service
or ServiceName
annotation
binaryName
- the binary name (e.g. Class.getName()
) of the
RequestContext subtypevalidateEntityProxy(String)
public void validateRequestFactory(java.lang.String binaryName)
This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs. It does not perform any checks as to whether or not the RequestContext could actually be generated by the Generator.
Checks implemented:
binaryName
implements RequestFactory
binaryName
- the binary name (e.g. Class.getName()
) of the
RequestContext subtypevalidateRequestContext(String)
public void validateValueProxy(java.lang.String binaryName)
This method may be called repeatedly on a single instance of the validator. Doing so will amortize type calculation costs.
Checks implemented:
binaryName
implements ValueProxybinaryName
has a ProxyFor
or ProxyForName
annotation
binaryName
- the binary name (e.g. Class.getName()
) of the
EntityProxy subtype
|
GWT 2.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |