本文整理了Java中java.lang.reflect.Constructor.getAnnotations()
方法的一些代码示例,展示了Constructor.getAnnotations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Constructor.getAnnotations()
方法的具体详情如下:
包路径:java.lang.reflect.Constructor
类名称:Constructor
方法名:getAnnotations
暂无
代码示例来源:origin: oldmanpushcart/greys-anatomy
@Override
public Annotation[] getAnnotations() {
return target.getAnnotations();
}
代码示例来源:origin: alibaba/jvm-sandbox
@Override
public Annotation[] getAnnotations() {
return target.getAnnotations();
}
代码示例来源:origin: spring-projects/spring-loaded
public List<Annotation> callConstructorGetAnnotations(Constructor<?> m) {
return Arrays.asList(m.getAnnotations());
}
public List<Annotation> callConstructorGetDeclaredAnnotations(Constructor<?> m) {
代码示例来源:origin: rapidoid/rapidoid
public static Set<Constructor<?>> getInjectableConstructors(Class<?> clazz) {
Set<Constructor<?>> constructors = U.set();
for (Constructor<?> constr : clazz.getDeclaredConstructors()) {
if (Metadata.hasAny(constr.getAnnotations(), ClassMetadata.INJECTION_ANNOTATIONS)) {
constructors.add(constr);
}
}
return constructors;
}
代码示例来源:origin: wildfly/wildfly
if (containsAnnotations(constructor.getAnnotations(), requiredAnnotation)) {
return true;
代码示例来源:origin: json-iterator/java
JsonCreator jsonCreator = getJsonCreator(ctor.getAnnotations());
if (jsonCreator == null) {
continue;
代码示例来源:origin: org.jboss.errai/errai-codegen
@Override
public synchronized Annotation[] getAnnotations() {
if (annotationsCache == null) {
annotationsCache = constructor.getAnnotations();
}
return annotationsCache;
}
代码示例来源:origin: errai/errai
@Override
public synchronized Annotation[] getAnnotations() {
if (annotationsCache == null) {
annotationsCache = constructor.getAnnotations();
}
return annotationsCache;
}
代码示例来源:origin: org.jboss.aop/jboss-aop
public <T extends Annotation> T[] getVisibleAnnotations(Constructor<?> c)
{
return (T[])c.getAnnotations();
}
};
代码示例来源:origin: org.jvnet.annox/annox
public Annotation[] getAnnotations() {
return constructor.getAnnotations();
}
代码示例来源:origin: org.mule/mule-core
/**
* Return the annotations associated with the target method/constructor itself.
*/
public Annotation[] getMethodAnnotations()
{
return (this.method != null ? this.method.getAnnotations() : this.constructor.getAnnotations());
}
代码示例来源:origin: constretto/constretto-core
/**
* Return the annotations associated with the target method/constructor itself.
*/
public Annotation[] getMethodAnnotations() {
return (this.method != null ? this.method.getAnnotations() : this.constructor.getAnnotations());
}
代码示例来源:origin: org.mule.runtime/mule-core
/**
* Return the annotations associated with the target method/constructor itself.
*/
public Annotation[] getMethodAnnotations() {
return (this.method != null ? this.method.getAnnotations() : this.constructor.getAnnotations());
}
代码示例来源:origin: at.molindo/molindo-utils
/**
* Return the annotations associated with the target method/constructor
* itself.
*/
public Annotation[] getMethodAnnotations() {
return this.method != null ? this.method.getAnnotations() : this.constructor.getAnnotations();
}
代码示例来源:origin: AvanzaBank/astrix
private boolean isAnnotationPresent(Constructor<?> constructor, Class<? extends Annotation> annotation) {
for (Annotation a : constructor.getAnnotations()) {
if (annotation.isAssignableFrom(a.getClass())) {
return true;
}
}
return false;
}
代码示例来源:origin: baratine/baratine
static <T> InjectionPoint<T> of(Constructor<?> c)
{
return new InjectionPointImpl<>(Key.of(c),
c.getDeclaringClass(),
c.getDeclaringClass().getSimpleName(),
c.getAnnotations(),
c.getDeclaringClass());
}
代码示例来源:origin: com.caucho/resin
public AnnotatedConstructorImpl(AnnotatedType<T> declaringType, Constructor<T> ctor)
{
super(createBaseType(declaringType), null, ctor.getAnnotations());
_declaringType = declaringType;
_ctor = ctor;
introspect(ctor);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-reflection
@NotNull
@Override
public Annotation[] getAnnotations() {
return getRawConstructor().getAnnotations();
}
代码示例来源:origin: org.ceylon-lang/ceylon.language
@Override
@Ignore
public java.lang.annotation.Annotation[] $getJavaAnnotations$() {
return Metamodel.getJavaConstructor(constructor).getAnnotations();
}
代码示例来源:origin: fakereplace/fakereplace
public static Annotation[] getAnnotations(Constructor<?> clazz) {
if (AnnotationDataStore.isConstructorDataRecorded(clazz)) {
return AnnotationDataStore.getConstructorAnnotations(clazz);
}
return clazz.getAnnotations();
}
内容来源于网络,如有侵权,请联系作者删除!