本文整理汇总了Java中org.springframework.core.type.AnnotationMetadata.isConcrete方法的典型用法代码示例。如果您正苦于以下问题:Java AnnotationMetadata.isConcrete方法的具体用法?Java AnnotationMetadata.isConcrete怎么用?Java AnnotationMetadata.isConcrete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.core.type.AnnotationMetadata
的用法示例。
在下文中一共展示了AnnotationMetadata.isConcrete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRelationCollectionInfo
import org.springframework.core.type.AnnotationMetadata; //导入方法依赖的package包/类
private Pair<String, String> getRelationCollectionInfo(Class<?> resourceClass) throws IOException
{
AnnotationMetadata annotationMetaData = getAnnotationMetadata(resourceClass.getCanonicalName());
if (annotationMetaData.isConcrete() && annotationMetaData.isIndependent())
{
if (annotationMetaData.getAnnotationTypes().contains(RelationshipResource.class.getCanonicalName()))
{
Map<String, Object> attrs = annotationMetaData.getAnnotationAttributes(RelationshipResource.class.getName());
String relationshipCollectionName = (String) attrs.get("name");
Class<?> entityResource = (Class<?>) attrs.get("entityResource");
String entityCollectionName = getEntityCollectionInfo(entityResource.getCanonicalName());
Pair<String, String> ret = new Pair<String, String>(entityCollectionName, relationshipCollectionName);
return ret;
}
else
{
return null;
}
}
else
{
throw new AlfrescoRuntimeException("");
}
}
示例2: getEntityCollectionInfo
import org.springframework.core.type.AnnotationMetadata; //导入方法依赖的package包/类
private String getEntityCollectionInfo(String className) throws IOException
{
AnnotationMetadata annotationMetaData = getAnnotationMetadata(className);
if (annotationMetaData.isConcrete() && annotationMetaData.isIndependent())
{
if (annotationMetaData.getAnnotationTypes().contains(EntityResource.class.getCanonicalName()))
{
Map<String, Object> attrs = annotationMetaData.getAnnotationAttributes(EntityResource.class.getName());
return (String) attrs.get("name");
}
else
{
return null;
}
}
else
{
throw new AlfrescoRuntimeException("");
}
}