public ClassLoader getNewClassloaderInstance(ClassLoader parent, ClassLoader current) { instrumentationClassLoader= new DragomeInstrumentationClassLoader(new URL[0], parent, current, getBytecodeTransformer(), getLoadedFromParent()); instrumentationClassLoader.setBytecodes(bytecodes); return instrumentationClassLoader; }
public void addLoaderPackagesRoot(String[] packagesroot) { for (String packageroot : packagesroot) addLoaderPackageRoot(packageroot); }
public void onSuccess(String result) { resultArray[0]= result; executionHandler.continueExecution(); }
@DelegateCode(ignore= true) public static ArrayBuffer createArrayBuffer(int length) { ScriptHelper.put("length", length, null); ArrayBuffer node= ScriptHelper.evalCasting("new ArrayBuffer(length)", ArrayBuffer.class, null); return node; } }
public boolean requiresTransformation(String className) { boolean transform= false; for (InstrumentationDragomeConfigurator configurator : configurators) if (configurator.isEnabled()) transform|= configurator.getBytecodeTransformer().requiresTransformation(className); return transform; } };
public byte[] transform(String className, byte[] bytecode) { byte[] transformedBytecode= bytecode; for (InstrumentationDragomeConfigurator configurator : configurators) if (configurator.isEnabled()) transformedBytecode= configurator.getBytecodeTransformer().transform(className, transformedBytecode); return transformedBytecode; }
public boolean filterClassPath(String classpathEntry) { boolean result= false; if (configurators.isEmpty()) result= super.filterClassPath(classpathEntry); else { for (InstrumentationDragomeConfigurator configurator : configurators) result|= configurator.filterClassPath(classpathEntry); } return result; } }
public void run() { Executor executor= ServiceLocator.getInstance().getConfigurator().getExecutionHandler().getExecutor(); executor.execute(new Runnable() { public void run() { applicationExecutor.executeByClassName(typeName); } }); } };
@DelegateCode(eval= "this.node.send()") public String sendSync(); @DelegateCode(eval= "this.node.send($1)")
private static ClassLoader fixNullParent(ClassLoader classLoader) { if (classLoader != null) { return classLoader; } else { return getSystemClassLoader(); } }
public boolean filterClassPath(String classpathEntry) { boolean include= false; include|= classpathEntry.contains("WEB-INF" + File.separatorChar + "classes"); include|= addClassesFolder(classpathEntry, "dragome-js-commons"); include|= addClassesFolder(classpathEntry, "dragome-w3c-standards"); include|= addClassesFolder(classpathEntry, "dragome-js-jre"); include|= addClassesFolder(classpathEntry, "dragome-core"); include|= addClassesFolder(classpathEntry, "dragome-web"); include|= addClassesFolder(classpathEntry, "dragome-guia"); include|= addClassesFolder(classpathEntry, "dragome-form-bindings"); include|= addClassesFolder(classpathEntry, "dragome-method-logger"); return include; }
/** * Adds a package root to the list of packages which must be loaded on the * parent loader. * * All subpackages are also included. * * @param packageRoot The root of all packages to be included. * Should not be <code>null</code>. */ public synchronized void addSystemPackageRoot(String packageRoot) { systemPackages.add(appendDot(packageRoot)); }
public boolean filterClassPath(String classpathEntry) { return super.filterClassPath(classpathEntry) || classpathEntry.contains("dragome-method-logger-"); } }
public void run() { Executor executor= ServiceLocator.getInstance().getConfigurator().getExecutionHandler().getExecutor(); executor.execute(new Runnable() { public void run() { VisualActivity application= (VisualActivity) ServiceLocator.getInstance().getReflectionService().createClassInstance(type); application.onCreate(); } }); }; };
@DelegateCode(eval= "this.node.send($1)") public String sendSync(Object data); }
public boolean filterClassPath(String classpathEntry) { return super.filterClassPath(classpathEntry) || classpathEntry.contains("dragome-callback-evictor-"); } }
public static String executeService(final String parameter) { final String[] executeService= new String[1]; Executor executor= ServiceLocator.getInstance().getConfigurator().getExecutionHandler().getExecutor(); executor.execute(new Runnable() { public void run() { SerializationService serializationService= ServiceLocator.getInstance().getSerializationService(); Object result= ((ServiceInvocation) serializationService.deserialize(parameter)).invoke(); executeService[0]= serializationService.serialize(result); ServerToClientServiceInvoker.finalizeMethodInvocationsInClient(); } }); return executeService[0]; } }
@DelegateCode(eval= "this.node.height") public int getHeightAsInteger(); }
@DelegateCode(eval= "this.node.data") String getDataAsString(); }
@DelegateCode(eval= "this.node.width") public int getWidthAsInteger(); @DelegateCode(eval= "this.node.height")