Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.76 KB | None | 0 0
  1. Java source file name completion and resource handling has never been easier.
  2.  
  3.    @Command("new-bean")
  4.    public void newBean(
  5.             @Option(required = false,
  6.                      name = "typed") final JavaResource res
  7.  
  8.    ) throws FileNotFoundException
  9.    {
  10.       if (res.exists())
  11.       {
  12.          System.out.println(res.getJavaSource().toString());
  13.       }
  14.       else
  15.       {
  16.          System.out.println(res.getFullyQualifiedName());
  17.       }
  18.    }
  19.  
  20. /**********************************************************************/
  21.  
  22. [example] example $ beans new-bean --typed com.Foo.java
  23. package com;
  24. public class Foo {
  25. }
  26.  
  27. [example] example $ beans new-bean --typed com.Bar.java
  28. /home/lb3/Desktop/example/src/main/java/com/Bar.java
  29. [example] example $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement