< prev index next >

src/java.base/share/classes/java/lang/invoke/TypeDescriptor.java

Print this page
rev 52981 : 8215300: additional changes to constants API


  44      * @jvms 4.3.3 Method Descriptors
  45      */
  46     String descriptorString();
  47 
  48 
  49     /**
  50      * An entity that has a field type descriptor
  51      *
  52      * @param <F> the class implementing {@linkplain TypeDescriptor.OfField}
  53      * @jvms 4.3.2 Field Descriptors
  54      * @since 12
  55      */
  56     interface OfField<F extends TypeDescriptor.OfField<F>> extends TypeDescriptor {
  57         /**
  58          * Does this field descriptor describe an array type?
  59          * @return whether this field descriptor describes an array type
  60          */
  61         boolean isArray();
  62 
  63         /**
  64          * Does this field descriptor describe a primitive type?

  65          * @return whether this field descriptor describes a primitive type
  66          */
  67         boolean isPrimitive();
  68 
  69         /**
  70          * If this field descriptor describes an array type, return
  71          * a descriptor for its component type, otherwise return {@code null}.
  72          * @return the component type, or {@code null} if this field descriptor does
  73          * not describe an array type
  74          */
  75         F componentType();
  76 
  77         /**
  78          * Return a descriptor for the array type whose component type is described by this
  79          * descriptor
  80          * @return the descriptor for the array type
  81          */
  82         F arrayType();
  83     }
  84 




  44      * @jvms 4.3.3 Method Descriptors
  45      */
  46     String descriptorString();
  47 
  48 
  49     /**
  50      * An entity that has a field type descriptor
  51      *
  52      * @param <F> the class implementing {@linkplain TypeDescriptor.OfField}
  53      * @jvms 4.3.2 Field Descriptors
  54      * @since 12
  55      */
  56     interface OfField<F extends TypeDescriptor.OfField<F>> extends TypeDescriptor {
  57         /**
  58          * Does this field descriptor describe an array type?
  59          * @return whether this field descriptor describes an array type
  60          */
  61         boolean isArray();
  62 
  63         /**
  64          * Does this field descriptor describe a primitive type (including void.)
  65          *
  66          * @return whether this field descriptor describes a primitive type
  67          */
  68         boolean isPrimitive();
  69 
  70         /**
  71          * If this field descriptor describes an array type, return
  72          * a descriptor for its component type, otherwise return {@code null}.
  73          * @return the component type, or {@code null} if this field descriptor does
  74          * not describe an array type
  75          */
  76         F componentType();
  77 
  78         /**
  79          * Return a descriptor for the array type whose component type is described by this
  80          * descriptor
  81          * @return the descriptor for the array type
  82          */
  83         F arrayType();
  84     }
  85 


< prev index next >