java-method-parser

0.4.8 • Public • Published

java-method-parser Build Status Coverage Status BCH compliance

Get an objective-c header file and translate it to equivalent javascript calls

Install

$ npm install java-method-parser

Usage

const fs = require("fs");
const javaMethodParser = require("java-method-parser");
const content = fs.readFileSync("/path/to/java/Ponies.java");
 
const output = objectiveCParser(content);
 
fs.writeFileSync("/path/to/project/ponies.json", output);

Example

package com.foo.bar.baz;
 
public class BasicName {
    private BasicName() {}
 
    /**
     *   asserting a matcher
     */
    public static ViewInteraction assertMatcher(ViewInteraction iMatcher<View> m) {}
 
    // This is for asserting invisibility 
    public static ViewInteraction assertNotVisible(ViewInteraction i) {}
}
{
    "name": "BasicName",
    "pcakage": "com.foo.bar",
    "methods": [
        {
            "args": [
                {
                    "type": "ViewInteraction",
                    "name": "i"
                },
                {
                    "type": "Matcher<View>",
                    "name": "m"
                }
            ],
            "comment": "asserting a matcher",
            "name": "assertMatcher",
            "returnType": "ViewInteraction"
        },
        {
            "args": [
                {
                    "type": "ViewInteraction",
                    "name": "i"
                }
            ],
            "comment": "This is for asserting invisibility",
            "name": "assertNotVisible",
            "returnType": "ViewInteraction"
        }
    ]
}

License

MIT © Daniel Schmidt

/java-method-parser/

    Package Sidebar

    Install

    npm i java-method-parser

    Weekly Downloads

    84

    Version

    0.4.8

    License

    MIT

    Unpacked Size

    7.41 kB

    Total Files

    6

    Last publish

    Collaborators

    • dschmidt