-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef76fdd
commit d3d324d
Showing
6 changed files
with
12 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Version 1.0.1 (2017-11-31) | ||
# Version 1.0.1 (2017-11-29) | ||
|
||
* [chg] Update to Seed 3.4.0. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,9 @@ | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package org.seedstack.shell.internal.commands; | ||
|
||
import org.apache.commons.beanutils.BeanUtils; | ||
import org.seedstack.seed.command.Argument; | ||
import org.seedstack.seed.command.Command; | ||
import org.seedstack.seed.command.CommandDefinition; | ||
|
||
|
@@ -17,17 +16,14 @@ | |
* | ||
* @author [email protected] | ||
*/ | ||
@CommandDefinition(scope = "", name = "str", description = "Return the argument string") | ||
@CommandDefinition(scope = "", name = "str", description = "Return the argument as a string") | ||
public class StrCommand implements Command { | ||
@Argument(index = 0, description = "The property to get", mandatory = false, defaultValue = "") | ||
private String string; | ||
|
||
@Override | ||
public Object execute(Object object) throws Exception { | ||
if (object != null) { | ||
return object.toString(); | ||
} else { | ||
return null; | ||
} | ||
|
||
return BeanUtils.getProperty(object, string); | ||
} | ||
} |