Package org.springframework.roo.model

Examples of org.springframework.roo.model.JavaPackage


        final ClassOrInterfaceTypeDetails mockGovernor = mock(ClassOrInterfaceTypeDetails.class);
        when(mockGovernor.getPhysicalTypeCategory()).thenReturn(
                PhysicalTypeCategory.CLASS);

        final JavaPackage mockPackage = mock(JavaPackage.class);
        when(mockPackage.getFullyQualifiedPackageName()).thenReturn(
                "com.foo.bar");

        final JavaType mockGovernorType = mock(JavaType.class);
        when(mockGovernorType.getPackage()).thenReturn(mockPackage);
        when(mockGovernor.getType()).thenReturn(mockGovernorType);
View Full Code Here


        }
        final String typeDirectory = FileUtils
                .getFirstDirectory(fileCanonicalPath);
        final String simpleTypeName = StringUtils.replace(fileCanonicalPath,
                typeDirectory + File.separator, "", 1).replace(".java", "");
        final JavaPackage javaPackage = typeResolutionService
                .getPackage(fileCanonicalPath);
        if (javaPackage == null) {
            return null;
        }
        final JavaType javaType = new JavaType(
                javaPackage.getFullyQualifiedPackageName() + "."
                        + simpleTypeName);
        final Pom module = projectOperations
                .getModuleForFileIdentifier(fileCanonicalPath);
        Validate.notNull(module, "The module for the file '"
                + fileCanonicalPath + "' could not be located");
View Full Code Here

    }

    @Test
    public void testConvertFromCompoundPackageNameInUpdateContext() {
        assertConvertFromValidText("COM.example", "update", TOP_LEVEL_PACKAGE);
        verify(mockLastUsed).setPackage(new JavaPackage(TOP_LEVEL_PACKAGE));
    }
View Full Code Here

TOP

Related Classes of org.springframework.roo.model.JavaPackage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.