Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)


Class SignatureAttribute

  extended by oracle.toplink.libraries.asm.Attribute
      extended by oracle.toplink.libraries.asm.attrs.SignatureAttribute
Direct Known Subclasses:

public class SignatureAttribute
extends Attribute

The Signature Attribute introduced in JSR-14 (Adding Generics to the Java Programming Language) and also defined in the Java Virtual Machine Specification, 3rd edition draft. This atribute is used for classes, fields and methods.

Classfiles need to carry generic type information in a backwards compatible way. This is accomplished by introducing a new "Signature" attribute for classes, methods and fields. The structure of this attribute is as follows:

   "Signature" (u4 attr-length, u2 signature-index)
When used as an attribute of a method or field, a signature gives the full (possibly generic) type of that method or field. When used as a class attribute, a signature indicates the type parameters of the class, followed by its supertype, followed by all its interfaces.

The type syntax in signatures is extended to parameterized types and type variables. There is also a new signature syntax for formal type parameters. The syntax extensions for signature strings are as follows:

   MethodOrFieldSignature ::= TypeSignature
   ClassSignature        ::= ParameterPartOpt super_TypeSignature interface_TypeSignatures
   TypeSignatures        ::= TypeSignatures TypeSignature
   TypeSignature         ::= ...
                             | ClassTypeSignature
                             | MethodTypeSignature
                             | TypeVariableSignature
   ClassTypeSignature    ::= 'L' Ident TypeArgumentsOpt ';'
                             | ClassTypeSignature '.' Ident ';' TypeArgumentsOpt
   MethodTypeSignature   ::= TypeArgumentsOpt '(' TypeSignatures ')'
                             TypeSignature ThrowsSignatureListOpt
   ThrowsSignatureList   ::= ThrowsSignature ThrowsSignatureList
                             | ThrowsSignature
   ThrowsSignature       ::= '^' TypeSignature
   TypeVariableSignature ::= 'T' Ident ';'
   TypeArguments         ::= '<' TypeSignature TypeSignatures '>'
   ParameterPart         ::= '<' ParameterSignature ParameterSignatures '>'
   ParameterSignatures   ::= ParameterSignatures ParameterSignature
   ParameterSignature ::= Ident ':' bound_TypeSignature

See Also:
JSR 14 : Add Generic Types To The JavaTM Programming Language

Field Summary
 java.lang.String signature
Fields inherited from class oracle.toplink.libraries.asm.Attribute
next, type
Constructor Summary
SignatureAttribute(java.lang.String signature)
Method Summary
 java.lang.String toString()
Methods inherited from class oracle.toplink.libraries.asm.Attribute
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


public java.lang.String signature
Constructor Detail


public SignatureAttribute()


public SignatureAttribute(java.lang.String signature)
Method Detail


public java.lang.String toString()
toString in class java.lang.Object

Copyright © 1998, 2012, Oracle. All Rights Reserved.