
com.develhack.lombok.eclipse.handlers.feature.UtilityHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of develhacked-lombok Show documentation
Show all versions of develhacked-lombok Show documentation
The library enhancing Java classes at compilation by annotations that contained in the Develhack Core Library.
The newest version!
package com.develhack.lombok.eclipse.handlers.feature;
import lombok.core.AST.Kind;
import lombok.core.AnnotationValues;
import lombok.core.HandlerPriority;
import lombok.eclipse.EclipseAnnotationHandler;
import lombok.eclipse.EclipseNode;
import org.eclipse.jdt.internal.compiler.ast.Annotation;
import org.mangosdk.spi.ProviderFor;
import com.develhack.annotation.feature.Utility;
@ProviderFor(EclipseAnnotationHandler.class)
@HandlerPriority(UtilityHandler.PRIORITY)
public class UtilityHandler extends AbstractFeatureHandler {
public static final int PRIORITY = VOHandler.PRIORITY + 1;
public UtilityHandler() {
super(Utility.class);
}
@Override
public void handle(AnnotationValues annotationValues, Annotation ast, EclipseNode annotationNode) {
super.handle(annotationValues, ast, annotationNode);
EclipseNode typeNode = annotationNode.up();
if (typeNode.getKind() != Kind.TYPE) {
annotationNode.addWarning(String.format("@%s is only applicable to the type.", getAnnotationName()));
return;
}
supplementFinalModifier();
supplementUncallableConstructor();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy