//go through each word and then match them to the correct class if necessary.
for ( int i = 0; i < words.length; ++i )
{
//each word
StringEntry word = words[i];
for ( int j = 0; j < packages.length; ++j )
{
//get the package from the PackageManager because this will hold
//the version with the classes also.
PackageType currentImport = packageManager.getPackageType( packages[j] );
//the package here might in fact be null because it wasn't parsed out
//this might be something that is either not included or is part
//of another package and wasn't parsed out.
if ( currentImport == null )
{
continue;
}
//see if the current word is within the package
//at this point the word could be a fully qualified package name
//(FQPN) or an imported package name.
String wordName = word.toString();
if ( wordName.indexOf( "." ) != -1 )
{
//if there is a "." in the string then we have to assume
//it is a package.