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

com.github.olaaronsson.process.util.ClassAnnotationUtil Maven / Gradle / Ivy

package com.github.olaaronsson.process.util;

import javax.lang.model.type.MirroredTypesException;

public class ClassAnnotationUtil {

	@FunctionalInterface
	public interface GetClassValue {
		void execute();
	}

	public static String getValueOverTypeMirror(GetClassValue c) {
		try {
			c.execute();
		} catch (MirroredTypesException ex) {
			return ex.getTypeMirrors().get(0).toString();
		}
		return null;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy