本文整理匯總了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();
}