Microsoft SDK for Java

LinkSafe

The LinkSafe attribute specifies that a class is accessible to untrusted classes. A native or COM class can normally only be used by trusted classes.

Attribute Level Generated By Directives
Class @security

LinkSafe_attribute {
    u2 attribute_name_index;
    u4 attribute_length;
}

The @security directive that generates this attribute has the following syntax:

@security(checkClassLinking=off)

Attribute Elements

attribute_name_index

This value must be a valid index into the constant_pool table. The constant_pool entry at that index must be the CONSTANT_Utf8_info structure representing the string "LinkSafe".

attribute_length

This value indicates the length of this attribute, excluding the initial six bytes, and may be 0 (zero).

Remarks

This attribute indicates that this class is explicitly declaring that it is safe for use by non-system (less than fully trusted) classes.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.