本文整理汇总了Java中org.springframework.roo.classpath.details.ItdTypeDetails.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ItdTypeDetails.getName方法的具体用法?Java ItdTypeDetails.getName怎么用?Java ItdTypeDetails.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.roo.classpath.details.ItdTypeDetails
的用法示例。
在下文中一共展示了ItdTypeDetails.getName方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: 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;
}
示例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 = 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;
}
示例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 = 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;
}
示例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 = 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;
}
示例6: 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
示例7: 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;
}
示例8: 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);
}
示例9: 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;
}
示例10: 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;
}
示例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 = 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);
}
示例12: 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 = entityToAuditMidMap.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);
}
示例13: ItdSourceFileComposer
import org.springframework.roo.classpath.details.ItdTypeDetails; //导入方法依赖的package包/类
/**
* Constructs an {@link ItdSourceFileComposer} containing the members that
* were requested in the passed object.
*
* @param itdTypeDetails to construct (required)
*/
public ItdSourceFileComposer(final ItdTypeDetails itdTypeDetails) {
Validate.notNull(itdTypeDetails, "ITD type details required");
Validate.notNull(itdTypeDetails.getName(),
"Introduction to is required");
this.itdTypeDetails = itdTypeDetails;
introductionTo = itdTypeDetails.getName();
aspect = itdTypeDetails.getAspect();
// Create my own resolver, so we can add items to it as we process
resolver = new ImportRegistrationResolverImpl(itdTypeDetails
.getAspect().getPackage());
resolver.addImport(introductionTo); // ROO-2932
for (final JavaType registeredImport : itdTypeDetails
.getRegisteredImports()) {
// Do a sanity check in case the user misused it
if (resolver.isAdditionLegal(registeredImport)) {
resolver.addImport(registeredImport);
}
}
appendTypeDeclaration();
appendDeclarePrecedence();
appendExtendsTypes();
appendImplementsTypes();
appendTypeAnnotations();
appendFieldAnnotations();
appendMethodAnnotations();
appendFields();
appendConstructors();
appendMethods(itdTypeDetails.getGovernor().getPhysicalTypeCategory()
.equals(PhysicalTypeCategory.INTERFACE));
appendInnerTypes();
appendTerminator();
// Now prepend the package declaration and any imports
// We need to do this ** at the end ** so we can ensure our compilation
// unit imports are correct, as they're built as we traverse over the
// other members
prependCompilationUnitDetails();
}