|
org.netbeans.modules.java.source 0.80.1 17 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.java.source.TypeUtilities
public final class TypeUtilities
Various utilities related to the TypeMirrors.
Types| Nested Class Summary | |
|---|---|
static class |
TypeUtilities.TypeNameOptions
Options for the getTypeName(javax.lang.model.type.TypeMirror, org.netbeans.api.java.source.TypeUtilities.TypeNameOptions[]) method. |
| Method Summary | |
|---|---|
CharSequence |
getTypeName(TypeMirror type,
TypeUtilities.TypeNameOptions... options)
Get textual representation of the given type. |
boolean |
isCastable(TypeMirror t1,
TypeMirror t2)
Check if type t1 can be cast to t2. |
TypeMirror |
substitute(TypeMirror type,
List<? extends TypeMirror> from,
List<? extends TypeMirror> to)
Substitute all occurrences of a type in 'from' with the corresponding type in 'to' in 'type'. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean isCastable(TypeMirror t1,
TypeMirror t2)
t1 - cast from typet2 - cast to type
IllegalArgumentException - if the 't1' is of EXACUTABLE,
PACKAGE, NONE, or OTHER kind
public TypeMirror substitute(TypeMirror type,
List<? extends TypeMirror> from,
List<? extends TypeMirror> to)
type - in which the types should be substitutedfrom - types to substituteto - substitute to types
IllegalArgumentException - if the 'from' and 'to' lists are not of the same length
@NonNull
@CheckReturnValue
public CharSequence getTypeName(@NullAllowed
TypeMirror type,
@NonNull
TypeUtilities.TypeNameOptions... options)
type - to printoptions - allows to specify various adjustments to the output text
|
org.netbeans.modules.java.source 0.80.1 17 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||