Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static functions as modules #4

Open
pbloem opened this issue Aug 1, 2013 · 0 comments
Open

Static functions as modules #4

pbloem opened this issue Aug 1, 2013 · 0 comments

Comments

@pbloem
Copy link
Member

pbloem commented Aug 1, 2013

Consider the following way of describing modules:

@Module(name="Adder", description="Adds two numbers together")
public class Adder
{
    @Main
    public static add(
        @In(name="first") int first,
        @In(name="second") int second)
    {
        return first + second;
    }
}

This is a concise way of writing small modules, but it's tricky to implement. This should be thought out carefully before implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant