{
result = new AttachmentScanResult("application/octet-stream", AttachmentScanResult.Type.SWA_REF);
}
else if (method.isAnnotationPresent(XmlMimeType.class))
{
XmlMimeType mimeTypeDecl = method.getAnnotation(XmlMimeType.class);
result = new AttachmentScanResult(mimeTypeDecl.value(), AttachmentScanResult.Type.XOP);
}
if(result!=null)
{
result.setIndex(-1); // default for return values
results.add(result);
}
}
// method parameter
int index = 0;
for (Annotation[] parameterAnnotations : method.getParameterAnnotations())
{
if (parameterAnnotations!=null)
{
for (Annotation annotation : parameterAnnotations)
{
AttachmentScanResult paramResult = null;
if(XmlAttachmentRef.class == annotation.annotationType())
{
paramResult = new AttachmentScanResult("application/octet-stream", AttachmentScanResult.Type.SWA_REF);
}
else if(XmlMimeType.class == annotation.annotationType())
{
XmlMimeType mimeTypeDecl = ((XmlMimeType)annotation);
paramResult = new AttachmentScanResult(mimeTypeDecl.value(), AttachmentScanResult.Type.XOP);
}
if(paramResult!=null)
{
paramResult.setIndex(index);