org.jannocessor.model.util.Get Maven / Gradle / Ivy
package org.jannocessor.model.util;
import org.jannocessor.collection.transform.api.Transformation;
import org.jannocessor.model.JavaElement;
import org.jannocessor.model.Name;
import org.jannocessor.model.type.JavaType;
public class Get {
public static final Transformation NAME;
public static final Transformation TYPE;
public static final Transformation FULL_NAME;
static {
NAME = new Transformation() {
@Override
public Name transform(JavaElement input) {
return input.getName();
}
};
}
static {
TYPE = new Transformation() {
@Override
public JavaType transform(JavaElement input) {
return input.getType();
}
};
}
static {
FULL_NAME = new Transformation() {
@Override
public String transform(JavaType type) {
return type.getCanonicalName();
}
};
}
}