[−][src]Struct charjpoet::poet::type_name::TypeName
Any type in Java's type system, plus {@code void}. This class is an identifier for primitive
types like {@code int} and raw reference types like {@code String} and {@code List}. It also
identifies composite types like {@code char[]} and {@code Set
Type names are dumb identifiers only and do not model the values they name. For example, the type name for {@code java.util.List} doesn't know about the {@code size()} method, the fact that lists are collections, or even that it accepts a single type parameter.
Instances of this class are immutable value objects that implement {@code equals()} and {@code hashCode()} properly.
Referencing existing types
Primitives and void are constants that you can reference directly: see {@link #INT}, {@link #DOUBLE}, and {@link #VOID}.
In an annotation processor you can get a type name instance for a type mirror by calling {@link #get(TypeMirror)}. In reflection code, you can use {@link #get(Type)}.
Defining new types
Create new reference types like {@code com.example.HelloWorld} with {@link
ClassName#get(String, String, String...)}. To build composite types like {@code char[]} and
{@code Set
Trait Implementations
impl Clone for TypeName
[src]
impl Debug for TypeName
[src]
impl<'de> Deserialize<'de> for TypeName
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for TypeName
[src]
Auto Trait Implementations
impl RefUnwindSafe for TypeName
impl Send for TypeName
impl Sync for TypeName
impl Unpin for TypeName
impl UnwindSafe for TypeName
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,