Compartilhar via


Pack200.IPacker.ClassAttributePfx Field

Definition

When concatenated with a class attribute name, indicates the format of that attribute, using the layout language specified in the JSR 200 specification.

[Android.Runtime.Register("CLASS_ATTRIBUTE_PFX")]
public const string ClassAttributePfx;
[<Android.Runtime.Register("CLASS_ATTRIBUTE_PFX")>]
val mutable ClassAttributePfx : string

Field Value

Attributes

Remarks

When concatenated with a class attribute name, indicates the format of that attribute, using the layout language specified in the JSR 200 specification.

For example, the effect of this option is built in: pack.class.attribute.SourceFile=RUH.

The special strings #ERROR, #STRIP, and #PASS are also allowed, with the same meaning as #UNKNOWN_ATTRIBUTE. This provides a way for users to request that specific attributes be refused, stripped, or passed bitwise (with no class compression).

Code like this might be used to support attributes for JCOV:

<code>
                Map p = packer.properties();
                p.put(CODE_ATTRIBUTE_PFX+"CoverageTable",       "NH[PHHII]");
                p.put(CODE_ATTRIBUTE_PFX+"CharacterRangeTable", "NH[PHPOHIIH]");
                p.put(CLASS_ATTRIBUTE_PFX+"SourceID",           "RUH");
                p.put(CLASS_ATTRIBUTE_PFX+"CompilationID",      "RUH");
</code>

Code like this might be used to strip debugging attributes:

<code>
                Map p = packer.properties();
                p.put(CODE_ATTRIBUTE_PFX+"LineNumberTable",    STRIP);
                p.put(CODE_ATTRIBUTE_PFX+"LocalVariableTable", STRIP);
                p.put(CLASS_ATTRIBUTE_PFX+"SourceFile",        STRIP);
</code>

Java documentation for java.util.jar.Pack200.Packer.CLASS_ATTRIBUTE_PFX.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to