private void writeImports(final StringBuilder topOfFile, final SortedMap<JavaType, Boolean> types) { for (final Entry<JavaType, Boolean> entry : types.entrySet()) { JavaType importType = entry.getKey(); boolean asStatic = entry.getValue(); if (introductionTo.equals(importType.getEnclosingType())) { // We don't "import" types defined within governor, as they // already have scope and this causes AJDT warnings (see // ROO-1686) continue; } if (!asStatic) { topOfFile.append("import ").append(importType.getFullyQualifiedTypeName()).append(";") .append(NEW_LINE); } } }
private void writeStaticImports(final StringBuilder topOfFile, final SortedMap<JavaType, Boolean> types) { boolean hasStaticImports = false; for (final Entry<JavaType, Boolean> entry : types.entrySet()) { JavaType importType = entry.getKey(); boolean asStatic = entry.getValue(); if (introductionTo.equals(importType.getEnclosingType())) { // We don't "import" types defined within governor, as they // already have scope and this causes AJDT warnings (see // ROO-1686) continue; } if (asStatic) { topOfFile.append("import static ").append(importType.getFullyQualifiedTypeName()) .append(";").append(NEW_LINE); hasStaticImports = true; } } // If some static field has been included, append a new line after the static imports if (hasStaticImports) { topOfFile.append(NEW_LINE); } }
private JavaType getDomainTypeOfFinderMethod(MethodMetadata method) { JavaType returnType = method.getReturnType(); if (returnType.getFullyQualifiedTypeName().equals( SpringJavaType.PAGE.getFullyQualifiedTypeName())) { if (returnType.getParameters() != null && returnType.getParameters().size() == 1) { return returnType.getParameters().get(0); } } else if (returnType.getEnclosingType() != null) { return returnType.getBaseType(); } return null; }
private JavaType getDomainTypeOfFinderMethod(MethodMetadata method) { JavaType returnType = method.getReturnType(); if (returnType.getFullyQualifiedTypeName().equals( SpringJavaType.PAGE.getFullyQualifiedTypeName())) { if (returnType.getParameters() != null && returnType.getParameters().size() == 1) { return returnType.getParameters().get(0); } } else if (returnType.getEnclosingType() != null) { return returnType.getBaseType(); } return null; }
if (importType.getImportType().getEnclosingType() == null) { typeToImportExpr = new QualifiedNameExpr(new NameExpr(importType.getImportType().getPackage() } else { typeToImportExpr = new QualifiedNameExpr(new NameExpr(importType.getImportType().getEnclosingType() .getFullyQualifiedTypeName()), importType.getImportType().getSimpleTypeName()); && importType.getEnclosingType() == null) { continue;
if (typeToImport.getEnclosingType() == null) { typeToImportExpr = new QualifiedNameExpr(new NameExpr(typeToImport.getPackage() } else { typeToImportExpr = new QualifiedNameExpr(new NameExpr(typeToImport.getEnclosingType() .getFullyQualifiedTypeName()), typeToImport.getSimpleTypeName());
private void writeImports(final StringBuilder topOfFile, final SortedMap<JavaType, Boolean> types) { for (final Entry<JavaType, Boolean> entry : types.entrySet()) { JavaType importType = entry.getKey(); boolean asStatic = entry.getValue(); if (introductionTo.equals(importType.getEnclosingType())) { // We don't "import" types defined within governor, as they // already have scope and this causes AJDT warnings (see // ROO-1686) continue; } if (!asStatic) { topOfFile.append("import ").append(importType.getFullyQualifiedTypeName()).append(";") .append(NEW_LINE); } } }
if (name.getEnclosingType() != null) { sb.append(".").append(name.getEnclosingType().getSimpleTypeName()); new JavaType(newName.getFullyQualifiedTypeName(), newName.getEnclosingType(), newName.getArray(), newName.getDataType(), newName.getArgName(), newName.getParameters(), name.getModule());
private void writeStaticImports(final StringBuilder topOfFile, final SortedMap<JavaType, Boolean> types) { boolean hasStaticImports = false; for (final Entry<JavaType, Boolean> entry : types.entrySet()) { JavaType importType = entry.getKey(); boolean asStatic = entry.getValue(); if (introductionTo.equals(importType.getEnclosingType())) { // We don't "import" types defined within governor, as they // already have scope and this causes AJDT warnings (see // ROO-1686) continue; } if (asStatic) { topOfFile.append("import static ").append(importType.getFullyQualifiedTypeName()) .append(";").append(NEW_LINE); hasStaticImports = true; } } // If some static field has been included, append a new line after the static imports if (hasStaticImports) { topOfFile.append(NEW_LINE); } }
private JavaType getDomainTypeOfFinderMethod(MethodMetadata method) { JavaType returnType = method.getReturnType(); if (returnType.getFullyQualifiedTypeName().equals( SpringJavaType.PAGE.getFullyQualifiedTypeName())) { if (returnType.getParameters() != null && returnType.getParameters().size() == 1) { return returnType.getParameters().get(0); } } else if (returnType.getEnclosingType() != null) { return returnType.getBaseType(); } return null; }
private JavaType getDomainTypeOfFinderMethod(MethodMetadata method) { JavaType returnType = method.getReturnType(); if (returnType.getFullyQualifiedTypeName().equals( SpringJavaType.PAGE.getFullyQualifiedTypeName())) { if (returnType.getParameters() != null && returnType.getParameters().size() == 1) { return returnType.getParameters().get(0); } } else if (returnType.getEnclosingType() != null) { return returnType.getBaseType(); } return null; }