Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Java source file name completion and resource handling has never been easier.
- @Command("new-bean")
- public void newBean(
- @Option(required = false,
- name = "typed") final JavaResource res
- ) throws FileNotFoundException
- {
- if (res.exists())
- {
- System.out.println(res.getJavaSource().toString());
- }
- else
- {
- System.out.println(res.getFullyQualifiedName());
- }
- }
- /**********************************************************************/
- [example] example $ beans new-bean --typed com.Foo.java
- package com;
- public class Foo {
- }
- [example] example $ beans new-bean --typed com.Bar.java
- /home/lb3/Desktop/example/src/main/java/com/Bar.java
- [example] example $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement