Struct genco::java::Method [−][src]
pub struct Method<'el> { pub modifiers: Vec<Modifier>, pub arguments: Vec<Argument<'el>>, pub body: Tokens<'el, Java<'el>>, pub returns: Java<'el>, pub parameters: Tokens<'el, Java<'el>>, pub comments: Vec<Cons<'el>>, pub throws: Option<Tokens<'el, Java<'el>>>, // some fields omitted }
Model for Java Methods.
Fields
modifiers: Vec<Modifier>
Method modifiers.
arguments: Vec<Argument<'el>>
Arguments for the constructor.
body: Tokens<'el, Java<'el>>
Body of the constructor.
returns: Java<'el>
Return type.
parameters: Tokens<'el, Java<'el>>
Generic parameters.
comments: Vec<Cons<'el>>
Comments associated with this method.
throws: Option<Tokens<'el, Java<'el>>>
Exception thrown by the method.
Methods
impl<'el> Method<'el>
[src]
impl<'el> Method<'el>
pub fn new<N>(name: N) -> Method<'el> where
N: Into<Cons<'el>>,
[src]
pub fn new<N>(name: N) -> Method<'el> where
N: Into<Cons<'el>>,
Build a new empty constructor.
pub fn annotation<A>(&mut self, annotation: A) where
A: IntoTokens<'el, Java<'el>>,
[src]
pub fn annotation<A>(&mut self, annotation: A) where
A: IntoTokens<'el, Java<'el>>,
Push an annotation.
pub fn name(&self) -> Cons<'el>
[src]
pub fn name(&self) -> Cons<'el>
Name of method.
Trait Implementations
impl<'el> Debug for Method<'el>
[src]
impl<'el> Debug for Method<'el>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'el> Clone for Method<'el>
[src]
impl<'el> Clone for Method<'el>
fn clone(&self) -> Method<'el>
[src]
fn clone(&self) -> Method<'el>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'el> From<Method<'el>> for Tokens<'el, Java<'el>>
[src]
impl<'el> From<Method<'el>> for Tokens<'el, Java<'el>>
impl<'el> IntoTokens<'el, Java<'el>> for Method<'el>
[src]
impl<'el> IntoTokens<'el, Java<'el>> for Method<'el>
fn into_tokens(self) -> Tokens<'el, Java<'el>>
[src]
fn into_tokens(self) -> Tokens<'el, Java<'el>>
Convert the type into tokens.