Methods Summary |
---|
void | displayExistingTarget()
println( "Targets:\n" + envGet( ENV_TARGET ) );
|
void | executeInternal()
final String [] operands = getOperands();
assert( operands != null );
if ( operands.length == 0 )
{
displayExistingTarget();
}
else
{
establishProxy();
setTargets( operands );
}
|
public static java.lang.String[] | getNames()
return( new String [] { "target", "t" } );
|
int | getNumRequiredOperands()
// require 1, by default
return( 0 );
|
public java.lang.String | getUsage()
return( CmdStrings.TARGET_HELP.toString() );
|
void | setTargets(java.lang.String[] targets)
putEnvTargets( targets );
warnEmptyTargets( targets );
|
void | warnEmptyTargets(java.lang.String[] targets)
// issue warning if some targets could not be resolved to anything
for ( int i = 0; i < targets.length; ++i )
{
final String target = targets[ i ];
final ObjectName [] objects =
getProxy().resolveTargets( new String [] { target } );
if ( objects.length == 0 )
{
println( "WARNING: target " +
target + " does not resolve to any objects" );
}
}
|