if (value instanceof String[]) {
List<String> interfaces = Arrays
.asList((String[]) value);
for (int j = 0; j < acceptedValues.length; j++) {
if (interfaces.contains(acceptedValues[j])) {
Pattern pattern = new Pattern();
Artifact artifact = abstractName
.getArtifact();
pattern.setArtifactId(artifact
.getArtifactId());
pattern.setGroupId(artifact.getGroupId());
pattern.setVersion(artifact.getVersion()
.toString());
pattern.setName((String) abstractName
.getName().get("name"));
if (!result.contains(pattern)) {
result.add(pattern);
}
break;
}
}
}
if (value instanceof String) {
String interfaces = (String) value;
for (int j = 0; j < acceptedValues.length; j++) {
if (interfaces.contains(acceptedValues[j])) {
Pattern pattern = new Pattern();
Artifact artifact = abstractName
.getArtifact();
pattern.setArtifactId(artifact
.getArtifactId());
pattern.setGroupId(artifact.getGroupId());
pattern.setVersion(artifact.getVersion()
.toString());
pattern.setName((String) abstractName
.getName().get("name"));
if (!result.contains(pattern)) {
result.add(pattern);
}
break;