Methods Summary |
---|
public java.lang.String | argsToString()Method returns {@link String} representation of arguments stored in the
{@link Invocation} instance.
if (argsString == null) {
List<Object> argList = null;
if (arguments != null && arguments.length > 0) {
if (arguments.length == 3 && "writeCharacters".equals(method.getName())) {
argList = new ArrayList<Object>(3);
argList.add(new String((char[]) arguments[0]));
argList.add(arguments[1]);
argList.add(arguments[2]);
} else {
argList = Arrays.asList(arguments);
}
}
argsString = (argList == null) ? "no arguments" : argList.toString();
}
return argsString;
|
public static com.sun.xml.ws.policy.jaxws.xmlstreamwriter.Invocation | createInvocation(java.lang.reflect.Method method, java.lang.Object[] args)Factory method that creates {@link Invocation} instance according to input
arguments
final Object[] arguments;
final XmlStreamWriterMethodType methodType = XmlStreamWriterMethodType.getMethodType(method.getName());
if (methodType == WRITE_CHARACTERS && args.length == 3) {
final Integer start = (Integer) args[1];
final Integer length = (Integer) args[2];
final char[] charArrayCopy = new char[length.intValue()];
System.arraycopy(args[0], start, charArrayCopy, 0, length);
arguments = new Object[3];
arguments[0] = charArrayCopy;
arguments[1] = Integer.valueOf(0);
arguments[2] = length;
} else {
arguments = args;
}
return new Invocation(method, methodType, arguments);
|
public java.lang.Object | execute(javax.xml.stream.XMLStreamWriter target)Executes the method on {@code target} {@code XMLStreamWriter} instance.
return method.invoke(target, arguments);
|
public java.lang.Object | getArgument(int index)Returns single invocation argument for this {@link Invocation} instance that
is stored in the invocation arguments array at position determined by {@code index}
argument.
if (arguments == null) {
throw LOGGER.logSevereException(new ArrayIndexOutOfBoundsException(WSP_1052_NO_ARGUMENTS_IN_INVOCATION(this.toString())));
}
return arguments[index];
|
public int | getArgumentsCount()Returns information about the number of arguments stored in this {@link Invocation}
instance
return (arguments == null) ? 0 : arguments.length;
|
public java.lang.String | getMethodName()Returns information about the name of the method represented by this {@link Invocation} instance
return method.getName();
|
public XmlStreamWriterMethodType | getMethodType()Returns information about the type of the method represented by this {@link Invocation} instance
return methodType;
|
public java.lang.String | toString()Method returns {@link String} representation of the {@link Invocation} instance.
final StringBuffer retValue = new StringBuffer(30);
retValue.append("invocation { method='").append(method.getName()).append("', args=").append(argsToString());
retValue.append('}");
return retValue.toString();
|