Examples of ClassPath


Examples of org.jf.dexlib2.analysis.ClassPath

        DexFile dexFile = DexFileFactory.loadDexFile(findResource(dexFilePath), 15);

        baksmaliOptions options = new baksmaliOptions();
        if (registerInfo) {
            options.registerInfo = baksmaliOptions.ALL | baksmaliOptions.FULLMERGE;
            options.classPath = new ClassPath();
        }
        options.useImplicitReferences = false;

        for (ClassDef classDef: dexFile.getClasses()) {
            StringWriter stringWriter = new StringWriter();
View Full Code Here

Examples of org.jf.dexlib2.analysis.ClassPath

        ClassDef threeClassDef = TestUtils.makeClassDef("Ltest/three;", "Ltest/two;");

        ImmutableSet<ClassDef> classes = ImmutableSet.<ClassDef>of(
                objectClassDef, oneClassDef, twoClassDef, threeClassDef);

        ClassPath classPath = new ClassPath(new ImmutableDexFile(classes));

        TypeProto objectClassProto = classPath.getClass("Ljava/lang/Object;");
        TypeProto oneClassProto = classPath.getClass("Ltest/one;");
        TypeProto twoClassProto = classPath.getClass("Ltest/two;");
        TypeProto threeClassProto = classPath.getClass("Ltest/three;");

        Assert.assertEquals(
                ImmutableList.<TypeProto>of(),
                ImmutableList.copyOf(TypeProtoUtils.getSuperclassChain(objectClassProto)));
View Full Code Here

Examples of org.jf.dexlib2.analysis.ClassPath

        // Ltest/one; isn't defined

        ClassDef twoClassDef = TestUtils.makeClassDef("Ltest/two;", "Ltest/one;");
        ClassDef threeClassDef = TestUtils.makeClassDef("Ltest/three;", "Ltest/two;");
        ImmutableSet<ClassDef> classes = ImmutableSet.<ClassDef>of(twoClassDef, threeClassDef);
        ClassPath classPath = new ClassPath(new ImmutableDexFile(classes));

        TypeProto unknownClassProto = classPath.getUnknownClass();
        TypeProto oneClassProto = classPath.getClass("Ltest/one;");
        TypeProto twoClassProto = classPath.getClass("Ltest/two;");
        TypeProto threeClassProto = classPath.getClass("Ltest/three;");

        Assert.assertEquals(
                ImmutableList.<TypeProto>of(oneClassProto, unknownClassProto),
                ImmutableList.copyOf(TypeProtoUtils.getSuperclassChain(twoClassProto)));
View Full Code Here

Examples of org.jvnet.hk2.component.classmodel.ClassPath

      preInitialized();
      habitat.initialized();
    }

    protected void populateHabitat(final Habitat habitat, InhabitantsParser ip) {
      final ClassPath classpath = ClassPath.create(habitat, true);
      Callable<InhabitantsParsingContextGenerator> populator = new Callable<InhabitantsParsingContextGenerator>() {
          @Override
          public InhabitantsParsingContextGenerator call() throws Exception {
            InhabitantsParsingContextGenerator ipcgen = InhabitantsParsingContextGenerator.create(habitat);
            Set<String> cpSet = classpath.getEntries();
            for (String fileName : cpSet) {
                File f = new File(fileName);
                if (f.exists()) {
                  try {
                    ipcgen.parse(f);
View Full Code Here

Examples of org.kitesdk.morphline.shaded.com.google.common.reflect.ClassPath

          }
          addClass(clazz, classes, iface);
        }
      } else {
        // Need to scan the classpath via ClassPath.from(loader)
        ClassPath classPath;
        try {
          classPath = ClassPath.from(loader);
        } catch (IOException e) {
          continue;
        }
        for (String importSpec : importSpecs) {
          Set<ClassInfo> classInfos = null;
          if (importSpec.endsWith(".**")) {
            String packageName = importSpec.substring(0, importSpec.length() - ".**".length());
            classInfos = classPath.getTopLevelClassesRecursive(packageName);
          } else if (importSpec.endsWith(".*")) {
            String packageName = importSpec.substring(0, importSpec.length() - ".*".length());
            classInfos = classPath.getTopLevelClasses(packageName);
          } else { // importSpec is assumed to be a fully qualified class name
            Class clazz;
            try {
              //clazz = Class.forName(importSpec, true, loader);
              clazz = loader.loadClass(importSpec);
View Full Code Here

Examples of org.netbeans.api.java.classpath.ClassPath

        if (type < 0 || type > 1) {
            // Not a source file.
            return null;
        }

        ClassPath cp = cache[2 + type];
        if (cp == null) {
            List<PathResourceImplementation> resources = new ArrayList<PathResourceImplementation>();

            /**@TODO
             * hacking for get scala platform's classpath and source path,
             * should get them from project's classpath or properties.
             */
            ScalaPlatform scalaPlatform = bootClassPathImpl.findActiveScalaPlatform();
            if (scalaPlatform != null) {
                /**
                 * we are not sure the initial order of gsf classpath and java classpath,
                 * we here just call scalaPlatform.getStandardLibraries() to initial SCALAC_CLASS_PATH
                 */
                ClassPath scalaStdCp = scalaPlatform.getStandardLibraries();
                for (Entry entry : scalaStdCp.entries()) {
                    resources.add(ClassPathSupport.createResource(entry.getURL()));
                }
            }

            if (type == 0) {
View Full Code Here

Examples of org.ofbiz.base.start.Classpath

        dataMap.put("ofbizHome", System.getProperty("ofbiz.home"));
        return dataMap;
    }

    private List<?>[] getClasspath() {
        Classpath classPath = new Classpath(System.getProperty("java.class.path"));
        List<File> elements = classPath.getElements();
        List<String> jar = FastList.newInstance();
        List<String> dir = FastList.newInstance();

        for (File f: elements) {
            if (f.exists()) {
View Full Code Here

Examples of org.ofbiz.base.start.Classpath

    protected  String geronimoRepository = null;

    public List<String> generate(String geronimoVersion, String geronimoHome, String instanceNumber) {
        geronimoRepository = geronimoHome + "/repository";
        Debug.logInfo("The WASCE or Geronimo Repository is " + geronimoRepository, module);
        Classpath classPath = new Classpath(System.getProperty("java.class.path"));
        List<File> elements = classPath.getElements();
        List<String> jar_version = new ArrayList<String>();
        String jarPath = null;
        String jarName = null;
        String newJarName = null;
        String jarNameSimple = null;
View Full Code Here

Examples of org.ofbiz.base.start.Classpath

        dataMap.put("ofbizHome", System.getProperty("ofbiz.home"));
        return dataMap;
    }

    private List<?>[] getClasspath() {
        Classpath classPath = new Classpath(System.getProperty("java.class.path"));
        List<File> elements = classPath.getElements();
        List<String> jar = FastList.newInstance();
        List<String> dir = FastList.newInstance();

        for (File f: elements) {
            if (f.exists()) {
View Full Code Here

Examples of org.ofbiz.base.start.Classpath

        dataMap.put("ofbizHome", System.getProperty("ofbiz.home"));
        return dataMap;
    }

    private List[] getClasspath() {
        Classpath classPath = new Classpath(System.getProperty("java.class.path"));
        List<File> elements = classPath.getElements();
        List<String> jar = FastList.newInstance();
        List<String> dir = FastList.newInstance();

        for (File f: elements) {
            if (f.exists()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.