Code example for Manifest

Methods: getAttributesgetMainAttributes

   * @param name  the name of the module. 
   * @return the attributes for the module or the main attributes if the jar contains no such module. 
  private Attributes getAttributes(final Manifest props, final String name)
    final Attributes attributes = props.getAttributes(name);
    if (attributes == null)
      return props.getMainAttributes();
    return attributes;
   * Looks up a single value in the given attribute collection using the given key. If the key is not contained in 
   * the attributes, this method returns the default value specified as parameter. 
   * @param attrs        the attributes where to lookup the key. 
   * @param name         the name of the key to use for the lookup. 
   * @param defaultValue the default value to return in case the attributes contain no such key. 
Experience pair programming with AI  Get Codota for Java