当前位置: 首页>>代码示例>>Java>>正文


Java ItdTypeDetails类代码示例

本文整理汇总了Java中org.springframework.roo.classpath.details.ItdTypeDetails的典型用法代码示例。如果您正苦于以下问题:Java ItdTypeDetails类的具体用法?Java ItdTypeDetails怎么用?Java ItdTypeDetails使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ItdTypeDetails类属于org.springframework.roo.classpath.details包,在下文中一共展示了ItdTypeDetails类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(ItdTypeDetails itdTypeDetails) {
    // Determine the governor for this ITD, and whether any metadata is even
    // hoping to hear about changes to that JavaType and its ITDs
    final JavaType governor = itdTypeDetails.getName();
    final String localMid = managedEntityTypes.get(governor);
    if (localMid != null) {
        return localMid;
    }

    final MemberHoldingTypeDetails memberHoldingTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (memberHoldingTypeDetails != null) {
        for (final JavaType type : memberHoldingTypeDetails
                .getLayerEntities()) {
            final String localMidType = managedEntityTypes.get(type);
            if (localMidType != null) {
                return localMidType;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:24,代码来源:PermissionEvaluatorMetadataProvider.java

示例2: assertItdContents

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
/**
 * Asserts that the ITD has the expected contents when the governor does or
 * does not contain the required members
 * 
 * @param alreadySerializable
 * @param alreadyHasVersionField
 */
private void assertItdContents(final boolean alreadySerializable,
        final boolean alreadyHasVersionField) {
    // Set up
    when(mockClassDetails.implementsType(JdkJavaType.SERIALIZABLE))
            .thenReturn(alreadySerializable);
    when(
            mockClassDetails
                    .declaresField(SerializableMetadata.SERIAL_VERSION_FIELD))
            .thenReturn(alreadyHasVersionField);
    final SerializableMetadata metadata = new SerializableMetadata(
            METADATA_ID, mockAspectName, mockGovernor);

    // Invoke
    final ItdTypeDetails itd = metadata.getItdTypeDetails();

    // Check
    assertEquals(alreadySerializable ? 0 : 1, itd.getImplementsTypes()
            .size());
    assertEquals(alreadyHasVersionField ? 0 : 1, itd.getDeclaredFields()
            .size());
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:29,代码来源:SerializableMetadataTest.java

示例3: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    // Determine the governor for this ITD, and whether any metadata is even
    // hoping to hear about changes to that JavaType and its ITDs
    final JavaType governor = itdTypeDetails.getName();
    final String localMid = domainTypeToRepositoryMidMap.get(governor);
    if (localMid != null) {
        return localMid;
    }

    final MemberHoldingTypeDetails memberHoldingTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (memberHoldingTypeDetails != null) {
        for (final JavaType type : memberHoldingTypeDetails
                .getLayerEntities()) {
            final String localMidType = domainTypeToRepositoryMidMap
                    .get(type);
            if (localMidType != null) {
                return localMidType;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:25,代码来源:RepositoryJpaMetadataProviderImpl.java

示例4: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    // Determine the governor for this ITD, and whether any metadata is even
    // hoping to hear about changes to that JavaType and its ITDs
    final JavaType governor = itdTypeDetails.getName();
    final String localMid = managedEntityTypes.get(governor);
    if (localMid != null) {
        return localMid;
    }

    final MemberHoldingTypeDetails memberHoldingTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (memberHoldingTypeDetails != null) {
        for (final JavaType type : memberHoldingTypeDetails
                .getLayerEntities()) {
            final String localMidType = managedEntityTypes.get(type);
            if (localMidType != null) {
                return localMidType;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:24,代码来源:ServiceClassMetadataProvider.java

示例5: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    // Determine the governor for this ITD, and whether any metadata is even
    // hoping to hear about changes to that JavaType and its ITDs
    final JavaType governor = itdTypeDetails.getName();
    final String localMid = entityToConverterMidMap.get(governor);
    if (localMid != null) {
        return localMid;
    }

    final MemberHoldingTypeDetails memberHoldingTypeDetails = getTypeLocationService()
            .getTypeDetails(itdTypeDetails.getGovernor().getName());
    if (memberHoldingTypeDetails != null) {
        for (final JavaType type : memberHoldingTypeDetails
                .getLayerEntities()) {
            final String localMidType = entityToConverterMidMap.get(type);
            if (localMidType != null) {
                return localMidType;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:24,代码来源:JsfConverterMetadataProviderImpl.java

示例6: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    // Determine the governor for this ITD, and whether any metadata is even
    // hoping to hear about changes to that JavaType and its ITDs
    final JavaType governor = itdTypeDetails.getName();
    final String localMid = entityToManagedBeanMidMap.get(governor);
    if (localMid != null) {
        return localMid;
    }

    final MemberHoldingTypeDetails memberHoldingTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (memberHoldingTypeDetails != null) {
        for (final JavaType type : memberHoldingTypeDetails
                .getLayerEntities()) {
            final String localMidType = entityToManagedBeanMidMap.get(type);
            if (localMidType != null) {
                return localMidType;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:24,代码来源:JsfManagedBeanMetadataProviderImpl.java

示例7: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    final ClassOrInterfaceTypeDetails governorTypeDetails = getTypeLocationService()
            .getTypeDetails(itdTypeDetails.getName());
    if (governorTypeDetails == null) {
        return null;
    }

    // Check whether a relevant layer component has appeared, changed, or
    // disappeared
    final String localMidForLayerManagedEntity = getWebJsonMidIfLayerComponent(governorTypeDetails);
    if (StringUtils.isNotBlank(localMidForLayerManagedEntity)) {
        return localMidForLayerManagedEntity;
    }

    // Check whether the relevant MVC controller has appeared, changed, or
    // disappeared
    return getWebJsonMidIfMvcController(governorTypeDetails);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:20,代码来源:WebJsonMetadataProviderImpl.java

示例8: addItdTypeDetails

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
public void addItdTypeDetails(final ItdTypeDetails itdTypeDetails) {
    if (itdTypeDetails == null || itdTypeDetails.getGovernor() == null) {
        return;
    }
    if (typeMap.get(itdTypeDetails.getGovernor().getName()
            .getFullyQualifiedTypeName()) == null) {
        typeMap.put(itdTypeDetails.getGovernor().getName()
                .getFullyQualifiedTypeName(),
                new HashMap<String, MemberHoldingTypeDetails>());
    }
    itdIdToTypeMap.put(itdTypeDetails.getDeclaredByMetadataId(),
            itdTypeDetails.getGovernor().getName()
                    .getFullyQualifiedTypeName());
    typeMap.get(
            itdTypeDetails.getGovernor().getName()
                    .getFullyQualifiedTypeName()).put(
            itdTypeDetails.getDeclaredByMetadataId(), itdTypeDetails);
    updateChanges(itdTypeDetails.getGovernor().getName(), false);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:20,代码来源:ItdDiscoveryServiceImpl.java

示例9: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(ItdTypeDetails itdTypeDetails) {      
   // Determine the governor for this ITD, and whether any metadata is even hoping to hear about changes to that JavaType and its ITDs.
   final JavaType governor = itdTypeDetails.getName();
   final String localMid = domainTypeToRepositoryMidMap.get(governor);
   if (localMid != null) {
      return localMid;
   }

   final MemberHoldingTypeDetails memberHoldingTypeDetails = typeLocationService.getTypeDetails(governor);
   if (memberHoldingTypeDetails != null) {
      for (final JavaType type : memberHoldingTypeDetails.getLayerEntities()) {
         final String localMidType = domainTypeToRepositoryMidMap.get(type);
         if (localMidType != null) {
            return localMidType;
         }
      }
   }
   return null;
}
 
开发者ID:lbroudoux,项目名称:spring-roo-addon-layers-repository-elasticsearch,代码行数:21,代码来源:RepositoryElasticsearchMetadataProvider.java

示例10: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(ItdTypeDetails itdTypeDetails) {

    // Determine the governor for this ITD, and whether any metadata is even
    // hoping to hear about changes to that JavaType and its ITDs
    JavaType governor = itdTypeDetails.getName();
    String localMid = entityToWebScaffoldMidMap.get(governor);

    return localMid == null ? null : localMid;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:11,代码来源:RelatedPatternMetadataProvider.java

示例11: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    final JavaType governor = itdTypeDetails.getName();

    // If the governor is a form backing object, refresh its local metadata
    final String localMid = entityToBatchMidMap.get(governor);
    if (localMid != null) {
        return localMid;
    }

    // If the governor is a layer component that manages a form backing
    // object, refresh that object's local metadata
    return getRelatedEntityComponent(governor);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:15,代码来源:WebJpaBatchMetadataProvider.java

示例12: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    // Determine the governor for this ITD, and whether any DOD metadata is
    // even hoping to hear about changes to that JavaType and its ITDs
    final JavaType governor = itdTypeDetails.getName();

    for (final JavaType type : itdTypeDetails.getGovernor()
            .getLayerEntities()) {
        final String localMidType = entityToDodMidMap.get(type);
        if (localMidType != null) {
            return localMidType;
        }
    }

    final String localMid = entityToDodMidMap.get(governor);
    if (localMid == null) {
        // No DOD is interested in this JavaType, so let's move on
        return null;
    }

    // We have some DOD metadata, so let's check if we care if any methods
    // match our requirements
    for (final MethodMetadata method : itdTypeDetails.getDeclaredMethods()) {
        if (BeanInfoUtils.isMutatorMethod(method)) {
            // A DOD cares about the JavaType, and an ITD offers a method
            // likely of interest, so let's formally trigger it to run.
            // Note that it will re-scan and discover this ITD, and register
            // a direct dependency on it for the future.
            return localMid;
        }
    }

    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:35,代码来源:DataOnDemandMetadataProviderImpl.java

示例13: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    // Determine if this ITD presents a method we're interested in (namely
    // accessors)
    for (final MethodMetadata method : itdTypeDetails.getDeclaredMethods()) {
        if (BeanInfoUtils.isAccessorMethod(method)
                && !method.getMethodName().getSymbolName().startsWith("is")) {
            // We care about this ITD, so formally request an update so we
            // can scan for it and process it

            // Determine the governor for this ITD, and the Path the ITD is
            // stored within
            final JavaType governorType = itdTypeDetails.getName();
            final String providesType = MetadataIdentificationUtils
                    .getMetadataClass(itdTypeDetails
                            .getDeclaredByMetadataId());
            final LogicalPath itdPath = PhysicalTypeIdentifierNamingUtils
                    .getPath(providesType,
                            itdTypeDetails.getDeclaredByMetadataId());

            // Produce the local MID we're going to use and make the request
            return createLocalIdentifier(governorType, itdPath);
        }
    }

    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:28,代码来源:SolrMetadataProvider.java

示例14: getLocalMidToRequest

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
@Override
protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
    final JavaType governor = itdTypeDetails.getName();

    // If the governor is a form backing object, refresh its local metadata
    final String localMid = entityToWebScaffoldMidMap.get(governor);
    if (localMid != null) {
        return localMid;
    }

    // If the governor is a layer component that manages a form backing
    // object, refresh that object's local metadata
    return getWebScaffoldMidIfLayerComponent(governor);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:15,代码来源:WebScaffoldMetadataProviderImpl.java

示例15: build

import org.springframework.roo.classpath.details.ItdTypeDetails; //导入依赖的package包/类
public MemberHoldingTypeDetails build() {
    if (existing instanceof ItdTypeDetails) {
        final ItdTypeDetailsBuilder itdBuilder = new ItdTypeDetailsBuilder(
                (ItdTypeDetails) existing);
        // Push in all members that may have been modified
        itdBuilder.setDeclaredFields(getDeclaredFields());
        itdBuilder.setDeclaredMethods(getDeclaredMethods());
        itdBuilder.setAnnotations(getAnnotations());
        itdBuilder.setCustomData(getCustomData());
        itdBuilder.setDeclaredConstructors(getDeclaredConstructors());
        itdBuilder.setDeclaredInitializers(getDeclaredInitializers());
        itdBuilder.setDeclaredInnerTypes(getDeclaredInnerTypes());
        itdBuilder.setExtendsTypes(getExtendsTypes());
        itdBuilder.setImplementsTypes(getImplementsTypes());
        itdBuilder.setModifier(getModifier());
        return itdBuilder.build();
    }
    else if (existing instanceof ClassOrInterfaceTypeDetails) {
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                (ClassOrInterfaceTypeDetails) existing);
        // Push in all members that may
        cidBuilder.setDeclaredFields(getDeclaredFields());
        cidBuilder.setDeclaredMethods(getDeclaredMethods());
        cidBuilder.setAnnotations(getAnnotations());
        cidBuilder.setCustomData(getCustomData());
        cidBuilder.setDeclaredConstructors(getDeclaredConstructors());
        cidBuilder.setDeclaredInitializers(getDeclaredInitializers());
        cidBuilder.setDeclaredInnerTypes(getDeclaredInnerTypes());
        cidBuilder.setExtendsTypes(getExtendsTypes());
        cidBuilder.setImplementsTypes(getImplementsTypes());
        cidBuilder.setModifier(getModifier());
        return cidBuilder.build();
    }
    else {
        throw new IllegalStateException(
                "Unknown instance of MemberHoldingTypeDetails");
    }
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:39,代码来源:MemberDetailsBuilder.java


注:本文中的org.springframework.roo.classpath.details.ItdTypeDetails类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。