expectNames = true;
found.add(ServiceName.class);
}
if (expectClasses) {
return new EmptyVisitor() {
@Override
public void visit(String name, Object value) {
if ("value".equals(name)) {
domainInternalName = ((Type) value).getInternalName();
} else if ("locator".equals(name)) {
locatorInternalName = ((Type) value).getInternalName();
}
}
};
}
if (expectNames) {
return new EmptyVisitor() {
@Override
public void visit(String name, Object value) {
String sourceName;
boolean locatorRequired = "locator".equals(name);
boolean valueRequired = "value".equals(name);