Java 类javax.enterprise.inject.spi.AnnotatedCallable 实例源码

项目:deltaspike    文件:Annotateds.java   
public int compare(AnnotatedCallable<? super T> arg0, AnnotatedCallable<? super T> arg1)
{
    // compare the names first
    int result = (arg0.getJavaMember().getName().compareTo(arg1.getJavaMember().getName()));
    if (result != 0)
    {
        return result;
    }
    result = arg0.getJavaMember().getDeclaringClass().getName().compareTo(arg1.getJavaMember()
            .getDeclaringClass().getName());
    if (result != 0)
    {
        return result;
    }
    result = arg0.getParameters().size() - arg1.getParameters().size();
    return result;
}
项目:deltaspike    文件:Annotateds.java   
/**
 * Generates a deterministic signature for an {@link AnnotatedCallable}. Two
 * <code>AnnotatedCallable</code>s that have the same annotations and
 * underlying callable will generate the same signature.
 */
public static <X> String createCallableId(AnnotatedCallable<X> method)
{
    StringBuilder builder = new StringBuilder();
    builder.append(method.getJavaMember().getDeclaringClass().getName());
    builder.append('.');
    builder.append(method.getJavaMember().getName());
    builder.append(createAnnotationCollectionId(method.getAnnotations()));
    builder.append(createParameterListId(method.getParameters()));
    return builder.toString();
}
项目:deltaspike    文件:Annotateds.java   
/**
 * <p>
 * Compare {@link AnnotatedCallable}s for equality.
 * </p>
 * <p/>
 * <p>
 * Two {@link AnnotatedCallable}s are considered equal if they have the same
 * underlying callable and annotations.
 * </p>
 */
public static boolean compareAnnotatedCallable(AnnotatedCallable<?> m1, AnnotatedCallable<?> m2)
{
    if (!m1.getJavaMember().equals(m2.getJavaMember()))
    {
        return false;
    }
    if (!compareAnnotated(m1, m2))
    {
        return false;
    }
    return compareAnnotatedParameters(m1.getParameters(), m2.getParameters());
}
项目:deltaspike    文件:Annotateds.java   
private static <X> boolean hasMethodParameters(AnnotatedCallable<X> callable)
{
    for (AnnotatedParameter<X> parameter : callable.getParameters())
    {
        if (!parameter.getAnnotations().isEmpty())
        {
            return true;
        }
    }
    return false;
}
项目:deltaspike    文件:AnnotatedParameterImpl.java   
/**
 * Constructor
 */
public AnnotatedParameterImpl(AnnotatedCallable<X> declaringCallable, Class<?> type, int position,
                              AnnotationStore annotations, Type genericType, Type typeOverride)
{
    super(type, annotations, genericType, typeOverride);
    this.declaringCallable = declaringCallable;
    this.position = position;
}
项目:Camel    文件:FrameworkAnnotatedParameter.java   
@Override
public AnnotatedCallable<X> getDeclaringCallable() {
    return null;
}
项目:tomee    文件:OpenEJBEnricher.java   
@Override
public AnnotatedCallable<Object> getDeclaringCallable() {
    return null;
}
项目:deltaspike    文件:AnnotatedParameterImpl.java   
/**
 * {@inheritDoc}
 */
@Override
public AnnotatedCallable<X> getDeclaringCallable()
{
    return declaringCallable;
}