
public class HostedModeClassRewriter extends Object
JavaScriptHost.RewriteJsniMethods,
RewriteRefsToJsoClasses,
WriteJsoInterface,
WriteJsoImpl| Modifier and Type | Class and Description |
|---|---|
static interface |
HostedModeClassRewriter.InstanceMethodOracle
Maps instance methods to the class in which they are declared.
|
static interface |
HostedModeClassRewriter.SingleJsoImplData
Contains data about how SingleJsoImpl methods are to be dispatched.
|
| Constructor and Description |
|---|
HostedModeClassRewriter(Set<String> jsoSubtypes,
Map<String,List<String>> jsoSuperTypes,
HostedModeClassRewriter.SingleJsoImplData jsoData,
HostedModeClassRewriter.InstanceMethodOracle mapper)
Creates a new
HostedModeClassRewriter for a specified set of
subclasses of JavaScriptObject. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isJsoImpl(String className)
Returns
true if the class is the implementation class for a
JSO subtype. |
boolean |
isJsoIntf(String className)
Returns
true if the class is the interface class for a JSO
subtype. |
byte[] |
rewrite(TypeOracle typeOracle,
String className,
byte[] classBytes,
Map<String,String> anonymousClassMap)
Performs rewriting transformations on a class.
|
byte[] |
writeJsoIntf(String className,
byte[] classBytes) |
public HostedModeClassRewriter(Set<String> jsoSubtypes, Map<String,List<String>> jsoSuperTypes, HostedModeClassRewriter.SingleJsoImplData jsoData, HostedModeClassRewriter.InstanceMethodOracle mapper)
HostedModeClassRewriter for a specified set of
subclasses of JavaScriptObject.jsoSubtypes - a set of binary type names representing JavaScriptObject
and all of its subtypes ofmapper - maps methods to the class in which they are declaredpublic boolean isJsoImpl(String className)
true if the class is the implementation class for a
JSO subtype.public boolean isJsoIntf(String className)
true if the class is the interface class for a JSO
subtype.public byte[] rewrite(TypeOracle typeOracle, String className, byte[] classBytes, Map<String,String> anonymousClassMap)
typeOracle - a typeOracle modeling the user classesclassName - the name of the classclassBytes - the bytes of the classanonymousClassMap - a map between the anonymous class names of java
compiler used to compile code and jdt. Emma-specific.public byte[] writeJsoIntf(String className, byte[] classBytes)
Copyright © 2018. All rights reserved.