fn build_native_methods(&self, methods: Vec<MethodDesc>, class: &mut Class) {
        for method in methods.iter() {
            let method_name = format!("native_{}", method.name.clone());
            let mut m = java::Method::new(method_name);
            m.modifiers = vec![Modifier::Private, Modifier::Static, Modifier::Native];

            match method.return_type.clone() {
                AstType::Void => (),
                _ => {
                    let java = JavaType::new(
                        method.return_type.clone(),
                        self.pkg.clone(),
                        method.origin_return_ty.clone(),
                    );
                    m.returns = java.to_transfer();
                }
            }

            let args = method.args.clone();
            for arg in args.iter() {
                match arg.ty.clone() {
                    AstType::Void => (),
                    _ => {
                        let java =
                            JavaType::new(arg.ty.clone(), self.pkg.clone(), arg.origin_ty.clone());
                        let mut argument = Argument::new(java.to_transfer(), arg.name.clone());
                        argument.modifiers = vec![];
                        m.arguments.push(argument);
                    }
                }
            }

            class.methods.push(m);
        }
    }
///
/// build native methods for accessing .so
///
build native methods for accessing .so
build native methods for accessing . so
fn build_native_methods(&self, methods: Vec<MethodDesc>, class: &mut Class) {
        for method in methods.iter() {
            let method_name = format!("native_{}", method.name.clone());
            let mut m = java::Method::new(method_name);
            m.modifiers = vec![Modifier::Private, Modifier::Static, Modifier::Native];
            match method.return_type.clone() {
                AstType::Void => (),
                _ => {
                    let java = JavaType::new(
                        method.return_type.clone(),
                        self.pkg.clone(),
                        method.origin_return_ty.clone(),
                    );
                    m.returns = java.to_transfer();
                }
            }
            let args = method.args.clone();
            for arg in args.iter() {
                match arg.ty.clone() {
                    AstType::Void => (),
                    _ => {
                        let java =
                            JavaType::new(arg.ty.clone(), self.pkg.clone(), arg.origin_ty.clone());
                        let mut argument = Argument::new(java.to_transfer(), arg.name.clone());
                        argument.modifiers = vec![];
                        m.arguments.push(argument);
                    }
                }
            }
            class.methods.push(m);
        }
    }
fn build_native_methods ( & self , methods : Vec < MethodDesc > , class : & mut Class ) { for method in methods . iter ( ) { let method_name = format ! ( " " method name clone ( ) ) ; let mut m = java :: Method :: new ( method_name ) ; m . modifiers = vec ! [ Modifier Private Modifier Static Modifier Native ] ; match method . return_type . clone ( ) { AstType :: Void => ( ) , _ => { let java = JavaType :: new ( method . return_type . clone ( ) , self . pkg . clone ( ) , method . origin_return_ty . clone ( ) , ) ; m . returns = java . to_transfer ( ) ; } } let args = method . args . clone ( ) ; for arg in args . iter ( ) { match arg . ty . clone ( ) { AstType :: Void => ( ) , _ => { let java = JavaType :: new ( arg . ty . clone ( ) , self . pkg . clone ( ) , arg . origin_ty . clone ( ) ) ; let mut argument = Argument :: new ( java . to_transfer ( ) , arg . name . clone ( ) ) ; argument . modifiers = vec ! [ ] ; m . arguments . push ( argument ) ; } } } class . methods . push ( m ) ; } }
build native methods for accessing .so
build native methods for accessing . so
&self
methods
Vec<MethodDesc>
class
&mut Class