org.cruxframework.crux.core.rebind
Class AbstractProxyCreator
java.lang.Object
org.cruxframework.crux.core.rebind.AbstractProxyCreator
- Direct Known Subclasses:
- AbstractInterfaceWrapperProxyCreator, AbstractKeyValueProxyCreator, ControllerProxyCreator, DataSourceProxyCreator, IocContainerRebind, JSonSerializerProxyCreator, ResourcesHandlerProxyCreator, ViewFactoryCreator
public abstract class AbstractProxyCreator
- extends Object
- Author:
- Thiago da Rosa de Bustamante
|
Constructor Summary |
AbstractProxyCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
boolean cacheable)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected com.google.gwt.core.ext.GeneratorContext context
logger
protected com.google.gwt.core.ext.TreeLogger logger
cacheable
protected boolean cacheable
cacheableVersionFound
protected boolean cacheableVersionFound
AbstractProxyCreator
public AbstractProxyCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
boolean cacheable)
- Parameters:
logger - context - crossDocumentIntf -
isAlreadyGenerated
protected boolean isAlreadyGenerated(String className)
create
public String create()
throws CruxGeneratorException
- Creates the proxy.
- Returns:
- a proxy class name .
- Throws:
CruxGeneratorException
generateLoggerField
protected void generateLoggerField(AbstractProxyCreator.SourcePrinter srcWriter)
- Parameters:
srcWriter -
generateProxyContructor
protected void generateProxyContructor(AbstractProxyCreator.SourcePrinter srcWriter)
throws CruxGeneratorException
- Generate the proxy constructor and delegate to the superclass constructor
using the default address for the
RemoteService.
- Throws:
CruxGeneratorException
generateProxyFields
protected void generateProxyFields(AbstractProxyCreator.SourcePrinter srcWriter)
throws CruxGeneratorException
- Generate any fields required by the proxy.
- Throws:
CruxGeneratorException
generateProxyMethods
protected void generateProxyMethods(AbstractProxyCreator.SourcePrinter srcWriter)
throws CruxGeneratorException
- Parameters:
srcWriter - serializableTypeOracle -
- Throws:
CruxGeneratorException
generateSubTypes
protected void generateSubTypes(AbstractProxyCreator.SourcePrinter srcWriter)
throws CruxGeneratorException
- Override this method to generate any nested type required by the proxy
- Parameters:
srcWriter -
- Throws:
CruxGeneratorException
logDebugMessage
protected void logDebugMessage(AbstractProxyCreator.SourcePrinter sourcePrinter,
String message)
- Parameters:
sourcePrinter - message -
getJsniSimpleSignature
protected String getJsniSimpleSignature(com.google.gwt.core.ext.typeinfo.JMethod method)
- Parameters:
method -
- Returns:
getProxyQualifiedName
public abstract String getProxyQualifiedName()
- Returns:
- the full qualified name of the proxy object.
getProxySimpleName
public abstract String getProxySimpleName()
- Returns:
- the simple name of the proxy object.
getSourcePrinter
protected abstract AbstractProxyCreator.SourcePrinter getSourcePrinter()
- Returns:
- a sourceWriter for the proxy class
isCrux2OldInterfacesCompatibilityEnabled
protected boolean isCrux2OldInterfacesCompatibilityEnabled()
- Returns:
generateMethodParameters
protected void generateMethodParameters(AbstractProxyCreator.SourcePrinter w,
com.google.gwt.dev.generator.NameFactory nameFactory,
com.google.gwt.core.ext.typeinfo.JMethod method)
- Parameters:
w - nameFactory - method -
generateMethodTrhowsClause
protected void generateMethodTrhowsClause(AbstractProxyCreator.SourcePrinter w,
com.google.gwt.core.ext.typeinfo.JMethod method)
- Parameters:
w - methodThrows -
generateProxyWrapperMethodDeclaration
protected List<com.google.gwt.core.ext.typeinfo.JParameter> generateProxyWrapperMethodDeclaration(AbstractProxyCreator.SourcePrinter srcWriter,
com.google.gwt.core.ext.typeinfo.JMethod method)
- Parameters:
srcWriter - method - returnType -
- Returns:
findCacheableImplementationAndMarkForReuseIfAvailable
protected boolean findCacheableImplementationAndMarkForReuseIfAvailable()
- Returns:
findCacheableImplementationAndMarkForReuseIfAvailable
protected boolean findCacheableImplementationAndMarkForReuseIfAvailable(com.google.gwt.core.ext.typeinfo.JClassType baseIntf)
isCacheable
protected boolean isCacheable()
cacheableVersionFound
protected boolean cacheableVersionFound()
Copyright © 2014. All rights reserved.