private JavaTypeDefinition searchImportedStaticFields(String fieldName) { if (staticFieldImageToTypeDef.containsKey(fieldName)) { return staticFieldImageToTypeDef.get(fieldName); } for (JavaTypeDefinition anOnDemandImport : importOnDemandStaticClasses) { JavaTypeDefinition typeDef = getFieldType(anOnDemandImport, fieldName, currentAcu.getType()); if (typeDef != null) { staticFieldImageToTypeDef.put(fieldName, typeDef); return typeDef; } } return null; }
private boolean isJUnit3Class(ASTCompilationUnit node) { ASTClassOrInterfaceDeclaration cid = node.getFirstDescendantOfType(ASTClassOrInterfaceDeclaration.class); if (cid == null) { return false; } if (node.getType() != null && TypeHelper.isA(node, JUNIT3_CLASS_NAME)) { return true; } else if (node.getType() == null) { ASTExtendsList extendsList = cid.getFirstChildOfType(ASTExtendsList.class); if (extendsList == null) { return false; } if (((ASTClassOrInterfaceType) extendsList.jjtGetChild(0)).getImage().endsWith("TestCase")) { return true; } String className = cid.getImage(); return className.endsWith("Test"); } else if (hasImports(node, JUNIT3_CLASS_NAME)) { return cid.getImage().endsWith("Test"); } return false; }
if (staticClassWithField != null) { JavaTypeDefinition typeDef = getFieldType(JavaTypeDefinition.forClass(staticClassWithField), fieldName, currentAcu.getType()); staticFieldImageToTypeDef.put(fieldName, typeDef);
private JavaTypeDefinition searchImportedStaticFields(String fieldName) { if (staticFieldImageToTypeDef.containsKey(fieldName)) { return staticFieldImageToTypeDef.get(fieldName); } for (JavaTypeDefinition anOnDemandImport : importOnDemandStaticClasses) { JavaTypeDefinition typeDef = getFieldType(anOnDemandImport, fieldName, currentAcu.getType()); if (typeDef != null) { staticFieldImageToTypeDef.put(fieldName, typeDef); return typeDef; } } return null; }
private boolean isJUnit3Class(ASTCompilationUnit node) { ASTClassOrInterfaceDeclaration cid = node.getFirstDescendantOfType(ASTClassOrInterfaceDeclaration.class); if (cid == null) { return false; } if (node.getType() != null && TypeHelper.isA(node, JUNIT3_CLASS_NAME)) { return true; } else if (node.getType() == null) { ASTExtendsList extendsList = cid.getFirstChildOfType(ASTExtendsList.class); if (extendsList == null) { return false; } if (((ASTClassOrInterfaceType) extendsList.jjtGetChild(0)).getImage().endsWith("TestCase")) { return true; } String className = cid.getImage(); return className.endsWith("Test"); } else if (hasImports(node, JUNIT3_CLASS_NAME)) { return cid.getImage().endsWith("Test"); } return false; }
if (staticClassWithField != null) { JavaTypeDefinition typeDef = getFieldType(JavaTypeDefinition.forClass(staticClassWithField), fieldName, currentAcu.getType()); staticFieldImageToTypeDef.put(fieldName, typeDef);