public class TypeConverter extends Object implements TypeMirrorUtilities
TypeConverter class converts types according to the mappings specified
in a set of Interfaces. An individual TypeConverter
will be created for each interface being processed, but the mappings for all other interfaces in the
same package are passed along as well.| Modifier and Type | Class and Description |
|---|---|
static class |
TypeConverter.Type |
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
primitives |
| Constructor and Description |
|---|
TypeConverter(Types types,
PackageShortener shortener,
Name targetPackage,
Stream<Source> sources) |
TypeConverter(Types types,
PackageShortener shortener,
Name targetPackage,
Stream<Source> sources,
Source primary) |
TypeConverter(Types types,
PackageShortener shortener,
Name targetPackage,
Stream<Source> sources,
Source primary,
Messager debug) |
| Modifier and Type | Method and Description |
|---|---|
TypeConverter.Type |
convert(TypeMirror element) |
TypeConverter.Type |
convert(TypeMirror element,
Map<String,String> typeRenames,
boolean unmapped) |
TypeConverter.Type |
convert(TypeMirror element,
Map<String,String> typeRenames,
boolean unmapped,
boolean supertype) |
TypeConverter.Type |
convert(VariableElement variable,
Map<String,String> typeRenames) |
Elements |
elements()
Provides access to the
Elements. |
Set<String> |
getImports() |
PackageShortener |
getPackageShortener() |
DeclaredType |
getRawType(TypeMirror type) |
Unmapped |
getUnmapped() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMap, getType, getTypeElement, getTypeMirrorpublic TypeConverter(Types types, PackageShortener shortener, Name targetPackage, Stream<Source> sources)
public TypeConverter(Types types, PackageShortener shortener, Name targetPackage, Stream<Source> sources, Source primary)
public Elements elements()
TypeMirrorUtilitiesElements.
This method must be implemented by the client type.elements in interface TypeMirrorUtilitiesElementspublic TypeConverter.Type convert(TypeMirror element)
public TypeConverter.Type convert(TypeMirror element, Map<String,String> typeRenames, boolean unmapped)
public TypeConverter.Type convert(TypeMirror element, Map<String,String> typeRenames, boolean unmapped, boolean supertype)
public TypeConverter.Type convert(VariableElement variable, Map<String,String> typeRenames)
public DeclaredType getRawType(TypeMirror type)
public PackageShortener getPackageShortener()
public Unmapped getUnmapped()
Copyright © 2022. All rights reserved.