com.github.datalking.context.annotation.MetadataUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of play-mvc Show documentation
Show all versions of play-mvc Show documentation
simple mvc framework based on java servlet.
The newest version!
package com.github.datalking.context.annotation;
import com.github.datalking.common.meta.AnnotationAttributes;
import com.github.datalking.common.meta.AnnotationMetadata;
import com.github.datalking.common.meta.MethodMetadata;
/**
* @author yaoo on 5/29/18
*/
public class MetadataUtils {
public static AnnotationAttributes attributesFor(AnnotationMetadata metadata, Class> annoClass) {
return attributesFor(metadata, annoClass.getName());
}
public static AnnotationAttributes attributesFor(AnnotationMetadata metadata, String annoClassName) {
return AnnotationAttributes.fromMap(metadata.getAnnotationAttributes(annoClassName, false));
}
public static AnnotationAttributes attributesFor(MethodMetadata metadata, Class> targetAnno) {
return AnnotationAttributes.fromMap(metadata.getAnnotationAttributes(targetAnno.getName()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy