All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.develhack.lombok.javac.handlers.assertion.NullableHandler Maven / Gradle / Ivy

Go to download

The library enhancing Java classes at compilation by annotations that contained in the Develhack Core Library.

The newest version!
package com.develhack.lombok.javac.handlers.assertion;

import lombok.core.HandlerPriority;
import lombok.javac.JavacAnnotationHandler;

import org.mangosdk.spi.ProviderFor;

import com.develhack.annotation.assertion.Nullable;
import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;

@ProviderFor(JavacAnnotationHandler.class)
@HandlerPriority(-1)
public class NullableHandler extends AbstractAssertionHandler {

	public NullableHandler() {
		super(Nullable.class);
	}

	@Override
	protected boolean checkVariableType(JCVariableDecl variable) {
		return checkReferenceType(variable);
	}

	@Override
	protected String getCheckMethodName() {
		return null;
	}

	@Override
	protected boolean hasCheckMethodCall(JCMethodDecl method, JCVariableDecl variable) {
		return true;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy