Lines 54-66
Link Here
|
54 |
* <p>If the receiver is an array binding, then the resulting dimension is the given dimension |
54 |
* <p>If the receiver is an array binding, then the resulting dimension is the given dimension |
55 |
* plus the dimension of the receiver. Otherwise the resulting dimension is the given |
55 |
* plus the dimension of the receiver. Otherwise the resulting dimension is the given |
56 |
* dimension.</p> |
56 |
* dimension.</p> |
57 |
* <p>It cannot be called on a recovered binding.</p> |
|
|
58 |
* |
57 |
* |
59 |
* @param dimension the given dimension |
58 |
* @param dimension the given dimension |
60 |
* @return an array type binding |
59 |
* @return an array type binding |
61 |
* @throws IllegalArgumentException:<ul> |
60 |
* @throws IllegalArgumentException:<ul> |
62 |
* <li>if the receiver represents the void type</li> |
61 |
* <li>if the receiver represents the void type</li> |
63 |
* <li>if the receiver represents a recovered binding</li> |
|
|
64 |
* <li>if the resulting dimensions is lower than one or greater than 255</li> |
62 |
* <li>if the resulting dimensions is lower than one or greater than 255</li> |
65 |
* </ul> |
63 |
* </ul> |
66 |
* @since 3.3 |
64 |
* @since 3.3 |
Lines 306-317
Link Here
|
306 |
* original source, since the compiler may change them (in particular, |
304 |
* original source, since the compiler may change them (in particular, |
307 |
* for inner class emulation). The <code>getDeclaredModifiers</code> method |
305 |
* for inner class emulation). The <code>getDeclaredModifiers</code> method |
308 |
* should be used if the original modifiers are needed. |
306 |
* should be used if the original modifiers are needed. |
309 |
* Returns 0 if this type does not represent a class, interface, enum, or annotation |
307 |
* Returns 0 if this type does not represent a class, an interface, an enum, an annotation |
310 |
* type. |
308 |
* type or a recovered type. |
311 |
* |
309 |
* |
312 |
* @return the compiled modifiers for this type binding or 0 |
310 |
* @return the compiled modifiers for this type binding or 0 |
313 |
* if this type does not represent a class, interface, enum, or annotation |
311 |
* if this type does not represent a class, an interface, an enum, an annotation |
314 |
* type |
312 |
* type or a recovered type. |
315 |
* @see #getDeclaredModifiers() |
313 |
* @see #getDeclaredModifiers() |
316 |
*/ |
314 |
*/ |
317 |
public int getModifiers(); |
315 |
public int getModifiers(); |
Lines 369-375
Link Here
|
369 |
* @return the binding for the package in which this class, interface, |
367 |
* @return the binding for the package in which this class, interface, |
370 |
* enum, or annotation type is declared, or <code>null</code> if this type |
368 |
* enum, or annotation type is declared, or <code>null</code> if this type |
371 |
* binding represents a primitive type, an array type, the null type, |
369 |
* binding represents a primitive type, an array type, the null type, |
372 |
* a type variable, a wildcard type, a capture binding, or a recovered binding. |
370 |
* a type variable, a wildcard type, a capture binding or a recovered type binding. |
373 |
*/ |
371 |
*/ |
374 |
public IPackageBinding getPackage(); |
372 |
public IPackageBinding getPackage(); |
375 |
|
373 |
|
Lines 454-461
Link Here
|
454 |
* <p> |
452 |
* <p> |
455 |
* If this type binding represents an interface, an array type, a |
453 |
* If this type binding represents an interface, an array type, a |
456 |
* primitive type, the null type, a type variable, an enum type, |
454 |
* primitive type, the null type, a type variable, an enum type, |
457 |
* an annotation type, a wildcard type, a capture binding, or a |
455 |
* an annotation type, a wildcard type, or a capture binding then |
458 |
* recovered binding then <code>null</code> is returned. |
456 |
* <code>null</code> is returned. |
459 |
* </p> |
457 |
* </p> |
460 |
* |
458 |
* |
461 |
* @return the superclass of the class represented by this type binding, |
459 |
* @return the superclass of the class represented by this type binding, |
Lines 593-599
Link Here
|
593 |
* of the given type, as specified in section 5.2 of <em>The Java Language |
591 |
* of the given type, as specified in section 5.2 of <em>The Java Language |
594 |
* Specification, Third Edition</em> (JLS3). |
592 |
* Specification, Third Edition</em> (JLS3). |
595 |
* |
593 |
* |
596 |
* <p>If the receiver or the argument is a recovered type, the answer is always false.</p> |
594 |
* <p>If the receiver or the argument is a recovered type, the answer is always false, |
|
|
595 |
* unless the two types are identical or the argument is <code>java.lang.Object</code>.</p> |
597 |
* |
596 |
* |
598 |
* @param variableType the type of a variable to check compatibility against |
597 |
* @param variableType the type of a variable to check compatibility against |
599 |
* @return <code>true</code> if an expression of this type can be assigned to a |
598 |
* @return <code>true</code> if an expression of this type can be assigned to a |
Lines 641-647
Link Here
|
641 |
* <code>A.isCastCompatible(B)</code> |
640 |
* <code>A.isCastCompatible(B)</code> |
642 |
* </p> |
641 |
* </p> |
643 |
* |
642 |
* |
644 |
* <p>If the receiver or the argument is a recovered type, the answer is always false.</p> |
643 |
* <p>If the receiver or the argument is a recovered type, the answer is always false, |
|
|
644 |
* unless the two types are identical or the argument is <code>java.lang.Object</code>.</p> |
645 |
* |
645 |
* |
646 |
* @param type the type to check compatibility against |
646 |
* @param type the type to check compatibility against |
647 |
* @return <code>true</code> if this type is cast compatible with the |
647 |
* @return <code>true</code> if this type is cast compatible with the |
Lines 651-659
Link Here
|
651 |
public boolean isCastCompatible(ITypeBinding type); |
651 |
public boolean isCastCompatible(ITypeBinding type); |
652 |
|
652 |
|
653 |
/** |
653 |
/** |
654 |
* Returns whether this type binding represents a class type. |
654 |
* Returns whether this type binding represents a class type or a recovered binding. |
655 |
* |
655 |
* |
656 |
* @return <code>true</code> if this object represents a class, |
656 |
* @return <code>true</code> if this object represents a class or a recovered binding, |
657 |
* and <code>false</code> otherwise |
657 |
* and <code>false</code> otherwise |
658 |
*/ |
658 |
*/ |
659 |
public boolean isClass(); |
659 |
public boolean isClass(); |
Lines 844-850
Link Here
|
844 |
* as specified in section 4.10 of <em>The Java Language |
844 |
* as specified in section 4.10 of <em>The Java Language |
845 |
* Specification, Third Edition</em> (JLS3). |
845 |
* Specification, Third Edition</em> (JLS3). |
846 |
* |
846 |
* |
847 |
* <p>If the receiver or the argument is a recovered type, the answer is always false.</p> |
847 |
* <p>If the receiver or the argument is a recovered type, the answer is always false, |
|
|
848 |
* unless the two types are identical or the argument is <code>java.lang.Object</code>.</p> |
848 |
* |
849 |
* |
849 |
* @param type the type to check compatibility against |
850 |
* @param type the type to check compatibility against |
850 |
* @return <code>true</code> if this type is subtype compatible with the |
851 |
* @return <code>true</code> if this type is subtype compatible with the |