final Set<String> unboundIdentifiers,
final BoundIdentifiers boundIdentifiers,
final List<Declaration> factDeclarations ) {
for ( Iterator<String> it = unboundIdentifiers.iterator(); it.hasNext(); ) {
String identifier = it.next();
Declaration declaration = createDeclarationObject( context,
identifier,
pattern );
// the name may not be a local field, such as enums
// maybe should have a safer way to detect this, as other issues may cause null too
// that we would need to know about
if ( declaration != null ) {
factDeclarations.add( declaration );
// implicit bindings need to be added to "local" declarations, as they are nolonger unbound
if ( boundIdentifiers.getDeclarations() == null ) {
boundIdentifiers.setDeclarations( new HashMap<String, Declaration>() );
}
boundIdentifiers.getDeclarations().put( identifier,
declaration );
boundIdentifiers.getDeclrClasses().put( identifier,
declaration.getExtractor().getExtractToClass() );
it.remove();
}
}
}