Codota Logo
LoadingClassLoader.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.crsh.lang.impl.java.LoadingClassLoader
constructor

Best Java code snippets using org.crsh.lang.impl.java.LoadingClassLoader.<init> (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: crashub/crash

public void testCompile() throws Exception {
 Compiler compiler = new Compiler();
 List<JavaClassFileObject> files = compiler.compile("A",
   "public class A implements java.util.concurrent.Callable<String> {\n" +
   "public String call() {\n" +
   "return \"hello\";\n" +
   "}\n" +
   "}");
 assertEquals(1, files.size());
 LoadingClassLoader loader = new LoadingClassLoader(Thread.currentThread().getContextClassLoader(), files);
 Class<?> A = loader.findClass("A");
 Callable<String> asCallable = (Callable<String>)A.newInstance();
 String ret = asCallable.call();
 assertEquals("hello", ret);
}
origin: crashub/crash

String simpleName = className.substring(className.lastIndexOf('.') + 1);
if (simpleName.equals(name)) {
 LoadingClassLoader loader = new LoadingClassLoader(this.loader, classFiles);
 try {
  Class<?> clazz = loader.loadClass(classFile.getClassName());
origin: crashub/crash

private void doTestImport(ClassLoaderFactory factory) throws Exception {
 Compiler compiler = new Compiler();
 List<JavaClassFileObject> files = compiler.compile("foo.A", "package foo;\n public class A {}");
 assertEquals(1, files.size());
 JavaClassFileObject aFile = files.get(0);
 JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "crash.jar");
 jar.add(new ByteArrayAsset(aFile.getBytes()), "foo/A.class");
 jar.setManifest(Thread.currentThread().getContextClassLoader().getResource("META-INF/MANIFEST.MF"));
 ClassLoader cl = factory.getClassLoader(jar);
 //
 compiler = new Compiler(cl);
 files = compiler.compile("B",
   "import foo.A;\n" +
     "public class B implements java.util.concurrent.Callable<A> {\n" +
     "public A call() {\n" +
     "return new A();\n" +
     "}\n" +
     "}");
 assertEquals(1, files.size());
 LoadingClassLoader loader = new LoadingClassLoader(cl, files);
 Class<?> B = loader.findClass("B");
 Callable<?> asCallable = (Callable<?>)B.newInstance();
 Object ret = asCallable.call();
 assertNotNull(ret);
 Class<?> A = ret.getClass();
 assertEquals("foo.A", A.getName());
 assertEquals(cl, A.getClassLoader());
}
origin: org.crashub/crash.shell

String simpleName = className.substring(className.lastIndexOf('.') + 1);
if (simpleName.equals(name)) {
 LoadingClassLoader loader = new LoadingClassLoader(this.loader, classFiles);
 try {
  Class<?> clazz = loader.loadClass(classFile.getClassName());
origin: com.github.corda.crash/crash.shell

String simpleName = className.substring(className.lastIndexOf('.') + 1);
if (simpleName.equals(name)) {
 LoadingClassLoader loader = new LoadingClassLoader(this.loader, classFiles);
 try {
  Class<?> clazz = loader.loadClass(classFile.getClassName());
org.crsh.lang.impl.javaLoadingClassLoader<init>

Popular methods of LoadingClassLoader

  • loadClass
  • findClass

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now