pub enum Java<'el> {
Primitive {
boxed: &'static str,
primitive: &'static str,
},
Class(Type<'el>),
Local {
name: Cons<'el>,
},
Optional(Optional<'el>),
}
Expand description
Java token specialization.
Variants§
Primitive
Primitive type.
Fields
Class(Type<'el>)
A class, with or without arguments, imported from somewhere.
Local
A local name with no specific qualification.
Optional(Optional<'el>)
Optional type.
Implementations§
Source§impl<'el> Java<'el>
impl<'el> Java<'el>
Sourcepub fn path<P: Into<Cons<'el>>>(&self, part: P) -> Java<'el>
pub fn path<P: Into<Cons<'el>>>(&self, part: P) -> Java<'el>
Extend the type with a nested path.
This discards any arguments associated with it.
Sourcepub fn with_arguments(&self, arguments: Vec<Java<'el>>) -> Java<'el>
pub fn with_arguments(&self, arguments: Vec<Java<'el>>) -> Java<'el>
Add arguments to the given variable.
Only applies to classes, any other will return the same value.
Sourcepub fn as_raw(&self) -> Java<'el>
pub fn as_raw(&self) -> Java<'el>
Get the raw type.
A raw type is one without generic arguments.
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Check if type is optional.
Sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Check if variable is primitive.
Sourcepub fn as_optional(&self) -> Option<&Optional<'el>>
pub fn as_optional(&self) -> Option<&Optional<'el>>
Get type as optional.
Sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Check if type is generic.
Trait Implementations§
Source§impl<'el> Custom for Java<'el>
impl<'el> Custom for Java<'el>
Source§impl<'el> IntoTokens<'el, Java<'el>> for (Cons<'el>, Constructor<'el>)
impl<'el> IntoTokens<'el, Java<'el>> for (Cons<'el>, Constructor<'el>)
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for Argument<'el>
impl<'el> IntoTokens<'el, Java<'el>> for Argument<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for BlockComment<'el>
impl<'el> IntoTokens<'el, Java<'el>> for BlockComment<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for Class<'el>
impl<'el> IntoTokens<'el, Java<'el>> for Class<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for Enum<'el>
impl<'el> IntoTokens<'el, Java<'el>> for Enum<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for Field<'el>
impl<'el> IntoTokens<'el, Java<'el>> for Field<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for Interface<'el>
impl<'el> IntoTokens<'el, Java<'el>> for Interface<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> IntoTokens<'el, Java<'el>> for Method<'el>
impl<'el> IntoTokens<'el, Java<'el>> for Method<'el>
Source§fn into_tokens(self) -> Tokens<'el, Java<'el>>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.
Source§impl<'el> Ord for Java<'el>
impl<'el> Ord for Java<'el>
Source§impl<'el> PartialOrd for Java<'el>
impl<'el> PartialOrd for Java<'el>
impl<'el> Eq for Java<'el>
impl<'el> StructuralPartialEq for Java<'el>
Auto Trait Implementations§
impl<'el> Freeze for Java<'el>
impl<'el> RefUnwindSafe for Java<'el>
impl<'el> !Send for Java<'el>
impl<'el> !Sync for Java<'el>
impl<'el> Unpin for Java<'el>
impl<'el> UnwindSafe for Java<'el>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'el, C> IntoTokens<'el, C> for Cwhere
C: Custom,
impl<'el, C> IntoTokens<'el, C> for Cwhere
C: Custom,
Source§fn into_tokens(self) -> Tokens<'el, C>
fn into_tokens(self) -> Tokens<'el, C>
Convert the type into tokens.