public boolean iterateThroughVarDefSearchStrings( Vector searchList, TypeSpecification typeDef, String category, TypeBody declarationType) throws JselException { boolean foundAnyCategory = false; for (int i = 0; i < searchList.size(); i++) { String searchStr = (String) searchList.elementAt(i); if ("*".equals(searchStr.substring(searchStr.length() - 1))) { String packageStr = searchStr.substring(0, searchStr.length() - 1); if (typeDef.getName().startsWith(packageStr)) { addCategory(category, typeDef.getName(), typeDef, declarationType); foundAnyCategory = true; } } else if (searchStr.equals(typeDef.getName())) { addCategory(category, searchStr, typeDef, declarationType); foundAnyCategory = true; } } return foundAnyCategory; }
public boolean nonTrivialTypeFilter(TypeSpecification typeDef) throws JselException { // !! should be xml configured if (typeDef.getName().startsWith("java.") || typeDef.getName().startsWith("com.ge.") || typeDef.getName().startsWith("ge.geia.") || typeDef.getName().startsWith("com.erc.") || typeDef.getName().startsWith("com.gefra.") || typeDef.getName().startsWith("com.geerc.") || typeDef.getName().startsWith("com.gecapital.") || typeDef.getName().startsWith("erc.") || typeDef.getName().startsWith("ercrio.rio.") || typeDef.getName().startsWith("com.iri.") || typeDef.getName().startsWith("com.igate.")) { return false; } return true; }
public void checkVariableType(TypeSpecification typDef, TypeBody declarationType) throws JselException, ClassNotFoundException { boolean foundAnyCategory = false; Iterator it = this.architecturalLayerMappingTable.values().iterator(); while (it.hasNext() && !foundAnyCategory) { ArchitecturalLayerMapping alm = (ArchitecturalLayerMapping) it.next(); Iterator stackEnum = alm.getTechStackEntityListValues().iterator(); while (stackEnum.hasNext() && !foundAnyCategory) { TechStackEntity tse = (TechStackEntity) stackEnum.next(); foundAnyCategory = iterateThroughVarDefSearchStrings( tse.getVariableMapping(), typDef, tse.getName(), declarationType); } } if (foundAnyCategory) { // THIS means, I have a dam clue about this var } else { if (nonTrivialTypeFilter(typDef)) { unknownVariableList.add(typDef.getName()); } } }