private Collection<JavaType> getTypesForModule(final String optionContext, final Pom targetModule) { final Collection<JavaType> typesForModule = typeLocationService.getTypesForModule(targetModule); if (!(optionContext.contains(SUPERCLASS) || optionContext.contains(INTERFACE) || optionContext .contains(ENUMERATION))) { return typesForModule; } final Collection<JavaType> types = new ArrayList<JavaType>(); for (final JavaType javaType : typesForModule) { final ClassOrInterfaceTypeDetails typeDetails = typeLocationService.getTypeDetails(javaType); if ((optionContext.contains(SUPERCLASS) && (Modifier.isFinal(typeDetails.getModifier()) || typeDetails .getPhysicalTypeCategory() == PhysicalTypeCategory.INTERFACE)) || (optionContext.contains(INTERFACE) && typeDetails.getPhysicalTypeCategory() != PhysicalTypeCategory.INTERFACE) || (optionContext.contains(ENUMERATION) && typeDetails.getPhysicalTypeCategory() != PhysicalTypeCategory.ENUMERATION)) { continue; } types.add(javaType); } return types; }
@Override public int hashCode() { if (hashCode == null) { int hash = aspect.hashCode() * governor.getName().hashCode() * governor.getModifier() * governor.getCustomData().hashCode() * PHYSICAL_TYPE_CATEGORY.hashCode() * (privilegedAspect ? 2 : 3); hash *= includeCustomDataHash(declaredConstructors); hash *= includeCustomDataHash(declaredFields); hash *= includeCustomDataHash(declaredMethods); hash *= new ItdSourceFileComposer(this).getOutput().hashCode(); this.hashCode = hash; } return hashCode; }
Validate.isTrue(cid.getPhysicalTypeCategory() == PhysicalTypeCategory.CLASS, "Type %s is not a class", entity.getFullyQualifiedTypeName()); Validate.isTrue(!Modifier.isAbstract(cid.getModifier()), "Type %s is abstract", entity.getFullyQualifiedTypeName());
Validate.isTrue(cid.getPhysicalTypeCategory() == PhysicalTypeCategory.CLASS, "Type %s is not a class", currentEntity.getFullyQualifiedTypeName()); Validate.isTrue(!Modifier.isAbstract(cid.getModifier()), "Type %s is abstract", currentEntity.getFullyQualifiedTypeName());
content = true; appendIndent(); if (innerType.getModifier() != 0) { append(Modifier.toString(innerType.getModifier())); append(" ");
final int javaParserModifier = JavaParserUtils.getJavaParserModifier(cid.getModifier()); TypeDeclaration typeDeclaration; ClassOrInterfaceDeclaration classOrInterfaceDeclaration;
/** {@inheritDoc} **/ public List<String> getServiceList() { List<String> classNames = new ArrayList<String>(); Set<ClassOrInterfaceTypeDetails> cids = typeLocationService .findClassesOrInterfaceDetailsWithAnnotation(new JavaType( GvNIXWebServiceProxy.class.getName())); for (ClassOrInterfaceTypeDetails cid : cids) { if (Modifier.isAbstract(cid.getModifier())) { continue; } classNames.add(cid.getName().getFullyQualifiedTypeName()); } return classNames; }
/** * {@inheritDoc} **/ public List<String> getServiceList() { List<String> classNames = new ArrayList<String>(); // Gets all classes annotated with @GvNIxWebService Set<ClassOrInterfaceTypeDetails> cids = typeLocationService .findClassesOrInterfaceDetailsWithAnnotation(new JavaType( GvNIXWebService.class.getName())); for (ClassOrInterfaceTypeDetails cid : cids) { // Exclude abstract classes if (Modifier.isAbstract(cid.getModifier())) { continue; } classNames.add(cid.getName().getFullyQualifiedTypeName()); } return classNames; }
@Override public int hashCode() { if (hashCode == null) { int hash = aspect.hashCode() * governor.getName().hashCode() * governor.getModifier() * governor.getCustomData().hashCode() * PHYSICAL_TYPE_CATEGORY.hashCode() * (privilegedAspect ? 2 : 3); hash *= includeCustomDataHash(declaredConstructors); hash *= includeCustomDataHash(declaredFields); hash *= includeCustomDataHash(declaredMethods); hash *= new ItdSourceFileComposer(this).getOutput().hashCode(); this.hashCode = hash; } return hashCode; }
if (!Modifier.isAbstract(governorTypeDetails.getModifier()) && !Modifier.isInterface(governorTypeDetails .getModifier())) {
Validate.isTrue(cid.getPhysicalTypeCategory() == PhysicalTypeCategory.CLASS, "Type %s is not a class", entity.getFullyQualifiedTypeName()); Validate.isTrue(!Modifier.isAbstract(cid.getModifier()), "Type %s is abstract", entity.getFullyQualifiedTypeName());
mutableTypeDetails.getModifier(), mutableTypeDetails.getName(), mutableTypeDetails.getPhysicalTypeCategory()); for (AnnotationMetadata annotationMetadata : annotationMetadataList) {
Validate.isTrue(cid.getPhysicalTypeCategory() == PhysicalTypeCategory.CLASS, "Type %s is not a class", currentEntity.getFullyQualifiedTypeName()); Validate.isTrue(!Modifier.isAbstract(cid.getModifier()), "Type %s is abstract", currentEntity.getFullyQualifiedTypeName());
Validate.notNull(cidRepository, "Java source code details unavailable for type %s", cidRepository); Validate.isTrue(!Modifier.isAbstract(cidRepository.getModifier()), "Type %s is abstract", klass.getFullyQualifiedTypeName());
content = true; appendIndent(); if (innerType.getModifier() != 0) { append(Modifier.toString(innerType.getModifier())); append(" ");