Package java.util.jar

Examples of java.util.jar.Attributes.containsKey()


/*     */       }
/* 368 */       else if (mfFile != null)
/*     */       {
/* 370 */         Manifest mf = VFSUtils.readManifest(mfFile);
/* 371 */         Attributes attrs = mf.getMainAttributes();
/* 372 */         if (attrs.containsKey(Attributes.Name.MAIN_CLASS))
/*     */         {
/* 374 */           type = 2;
/*     */         }
/*     */         else
/*     */         {
View Full Code Here


/*     */       }
/* 247 */       else if (mfFile != null)
/*     */       {
/* 249 */         Manifest mf = VFSUtils.readManifest(mfFile);
/* 250 */         Attributes attrs = mf.getMainAttributes();
/* 251 */         if (attrs.containsKey(Attributes.Name.MAIN_CLASS))
/*     */         {
/* 253 */           type = 2;
/*     */         }
/*     */         else
/*     */         {
View Full Code Here

                    facadeRA instanceof FileArchive ? 1 : 0,
                    new File(facadeRA.getURI().getPath()).getAbsolutePath()));
        }
        final Attributes mainAttrs = mf.getMainAttributes();
        FacadeLaunchable result = null;
        if (mainAttrs.containsKey(GLASSFISH_APPCLIENT)) {
            if ( ! (facadeRA instanceof HTTPInputArchive)) {
                result = new FacadeLaunchable(habitat, mainAttrs, facadeRA,
                        dirContainingStandAloneFacade(facadeRA));
            } else {
                result = new JWSFacadeLaunchable(habitat, mainAttrs, facadeRA);
View Full Code Here

        continue;
      }
     
      //try {
        //classLoader.addURL(coreMod.toURI().toURL());
        if(!mfAttributes.containsKey(COREMODCONTAINSFMLMOD)) {
          FMLRelaunchLog.finer("Adding %s to the list of known coremods, it will not be examined again", coreMod.getName());
          ((List<String>)loadedCoremods.get(null)).add(coreMod.getName());
        } else {
          FMLRelaunchLog.finer("Found FMLCorePluginContainsFMLMod marker in %s, it will be examined later for regular @Mod instances", coreMod.getName());
          //((List<String>)reparsedCoremods.get(null)).add(coreMod.getName());
View Full Code Here

    private boolean hasAttribute(String attr) {
        final Attributes.Name key = new Attributes.Name(attr);
        Attributes atts;
        if (mode != null) {
            atts = manifest.getAttributes(mode);
            if (atts != null && atts.containsKey(key))
                return true;
        }
        atts = manifest.getMainAttributes();
        return atts.containsKey(new Attributes.Name(attr));
    }
View Full Code Here

            atts = manifest.getAttributes(mode);
            if (atts != null && atts.containsKey(key))
                return true;
        }
        atts = manifest.getMainAttributes();
        return atts.containsKey(new Attributes.Name(attr));
    }

    private List<String> getListAttribute(String attr) {
        return split(getAttribute(attr), "\\s+");
    }
View Full Code Here

    private boolean hasAttribute(String attr) {
        final Attributes.Name key = new Attributes.Name(attr);
        Attributes atts;
        if (mode != null) {
            atts = manifest.getAttributes(mode);
            if (atts != null && atts.containsKey(key))
                return true;
        }
        atts = manifest.getMainAttributes();
        return atts.containsKey(new Attributes.Name(attr));
    }
View Full Code Here

            atts = manifest.getAttributes(mode);
            if (atts != null && atts.containsKey(key))
                return true;
        }
        atts = manifest.getMainAttributes();
        return atts.containsKey(new Attributes.Name(attr));
    }

    private List<String> getListAttribute(String attr) {
        final String vals = getAttribute(attr);
        if (vals == null)
View Full Code Here

                sortOrder = (sortOrder == null ? Integer.valueOf(0) : sortOrder);
                handleCascadingTweak(coreMod, jar, cascadedTweaker, classLoader, sortOrder);
                loadedCoremods.add(coreMod.getName());
                continue;
            }
            List<String> modTypes = mfAttributes.containsKey(MODTYPE) ? Arrays.asList(mfAttributes.getValue(MODTYPE).split(",")) : ImmutableList.of("FML");

            if (!modTypes.contains("FML"))
            {
                FMLRelaunchLog.fine("Adding %s to the list of things to skip. It is not an FML mod,  it has types %s", coreMod.getName(), modTypes);
                loadedCoremods.add(coreMod.getName());
View Full Code Here

            {
                FMLRelaunchLog.fine("Adding %s to the list of things to skip. It is not an FML mod,  it has types %s", coreMod.getName(), modTypes);
                loadedCoremods.add(coreMod.getName());
                continue;
            }
            String modSide = mfAttributes.containsKey(MODSIDE) ? mfAttributes.getValue(MODSIDE) : "BOTH";
            if (! ("BOTH".equals(modSide) || FMLLaunchHandler.side.name().equals(modSide)))
            {
                FMLRelaunchLog.fine("Mod %s has ModSide meta-inf value %s, and we're %s. It will be ignored", coreMod.getName(), modSide, FMLLaunchHandler.side.name());
                loadedCoremods.add(coreMod.getName());
                continue;
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.