Skip to content

retog/wymiwyg-commons-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WYMIWYG Commons Core

Some utility classes. For example:

ArgumentHandler

Allows to handle command line arguments by annotating an interface, e.g.

import org.wymiwyg.commons.util.arguments.CommandLine;

public interface MyAppArgs {
    
    @CommandLine (
        longName ="token",
        shortName = "T", 
        required = true,
        description = "The API-Token to access Service"
    )
    public String token();

    @CommandLine (
        longName ="supressExtensions",
        shortName = "S",
        required = false,
        defaultValue = "true",
        description = "Supress the file extensions"
    )
}

And getting an instance implementing that interface with:

import org.wymiwyg.commons.util.arguments.ArgumentHandler;

[...]

public static void main(String[] args) throws Exception {
    MyAppArgs arguments = ArgumentHandler.readArguments(MyAppArgs.class, args);
    [...]
}

About

Some generic utility classes

Resources

License

Stars

Watchers

Forks

Packages

No packages published