本文整理汇总了Java中lombok.eclipse.handlers.ast.EclipseType类的典型用法代码示例。如果您正苦于以下问题:Java EclipseType类的具体用法?Java EclipseType怎么用?Java EclipseType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EclipseType类属于lombok.eclipse.handlers.ast包,在下文中一共展示了EclipseType类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<EventPublisher> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(EventPublisher.class));
return;
}
EclipseNode eventPublisherNode = type.getAnnotation(EventPublisher.class);
AnnotationValues<EventPublisher> eventPublisherAnnotation = createAnnotation(EventPublisher.class, eventPublisherNode);
EclipseUtil.addInterface(type.get(), EventPublisherConstants.EVENT_PUBLISHER_TYPE, source);
handler.addEventPublisherSupport(type, eventPublisherAnnotation.getInstance());
type.editor().rebuild();
}
示例2: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<MessageSourceAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(MessageSourceAware.class));
return;
}
EclipseUtil.addInterface(type.get(), MessageSourceAwareConstants.MESSAGE_SOURCE_TYPE, source);
handler.addMessageSourceSupport(type);
type.editor().rebuild();
}
示例3: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<ThreadingAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(ThreadingAware.class));
return;
}
EclipseUtil.addInterface(type.get(), ThreadingAwareConstants.THREADING_HANDLER_TYPE, source);
handler.addThreadingHandlingSupport(type);
type.editor().rebuild();
}
示例4: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<ResourceResolverAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(ResourceResolverAware.class));
return;
}
EclipseUtil.addInterface(type.get(), ResourceResolverAwareConstants.RESOURCE_RESOLVER_TYPE, source);
handler.addResourceResolverSupport(type);
type.editor().rebuild();
}
示例5: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<MVCAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(MVCAware.class));
return;
}
EclipseUtil.addInterface(type.get(), MVCAwareConstants.MVC_HANDLER_TYPE, source);
handler.addMVCSupport(type);
type.editor().rebuild();
}
示例6: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<ResourcesAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(ResourcesAware.class));
return;
}
EclipseUtil.addInterface(type.get(), ResourcesAwareConstants.RESOURCE_HANDLER_TYPE, source);
handler.addResourceHandlerSupport(type);
type.editor().rebuild();
}
示例7: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<DataSourceAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(DataSourceAware.class));
return;
}
EclipseUtil.addInterface(type.get(), DataSourceAwareConstants.DATA_SOURCE_HANDLER_TYPE, source);
handler.addDataSourceSupport(type);
type.editor().rebuild();
}
示例8: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<Twitter4jAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(Twitter4jAware.class));
return;
}
EclipseUtil.addInterface(type.get(), Twitter4jAwareConstants.TWITTER4j_CONTRIBUTION_HANDLER_TYPE, source);
handler.addTwitter4jProviderField(type);
handler.addTwitter4jProviderAccessors(type);
handler.addTwitter4jContributionMethods(type);
type.editor().rebuild();
}
示例9: handle
import lombok.eclipse.handlers.ast.EclipseType; //导入依赖的package包/类
@Override
public void handle(AnnotationValues<JdbiAware> annotation, Annotation source, EclipseNode annotationNode) {
EclipseType type = EclipseType.typeOf(annotationNode, source);
if (type.isAnnotation() || type.isInterface()) {
annotationNode.addError(canBeUsedOnClassAndEnumOnly(JdbiAware.class));
return;
}
EclipseUtil.addInterface(type.get(), JdbiAwareConstants.JDBI_CONTRIBUTION_HANDLER_TYPE, source);
handler.addJdbiProviderField(type);
handler.addJdbiProviderAccessors(type);
handler.addJdbiContributionMethods(type);
type.editor().rebuild();
}