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

com.silentgo.core.aop.MethodParam Maven / Gradle / Ivy

package com.silentgo.core.aop;

import com.silentgo.utils.log.Log;
import com.silentgo.utils.log.LogFactory;
import com.silentgo.utils.reflect.SGParameter;

import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.List;

/**
 * Project : silentgo
 * com.silentgo.core
 *
 * @author teddyzhu
 *         

* Created by teddyzhu on 16/7/27. */ public class MethodParam { private static final Log LOGGER = LogFactory.get(); SGParameter sgParameter; private List annotations; public Class getType() { return sgParameter.getClz(); } public String getName() { return sgParameter.getName(); } public MethodParam(SGParameter sgParameter) { this.sgParameter = sgParameter; this.annotations = new ArrayList<>(sgParameter.getAnnotationMap().values()); } public boolean existAnnotation(Class clz) { return sgParameter.getAnnotationMap().containsKey(clz); } public T getAnnotation(Class tClass) { return (T) sgParameter.getAnnotationMap().get(tClass); } public List getAnnotations() { return annotations; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy