当前位置: 首页>>代码示例>>Java>>正文


Java AnnotationParser.parseParameterAnnotations方法代码示例

本文整理汇总了Java中sun.reflect.annotation.AnnotationParser.parseParameterAnnotations方法的典型用法代码示例。如果您正苦于以下问题:Java AnnotationParser.parseParameterAnnotations方法的具体用法?Java AnnotationParser.parseParameterAnnotations怎么用?Java AnnotationParser.parseParameterAnnotations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.reflect.annotation.AnnotationParser的用法示例。


在下文中一共展示了AnnotationParser.parseParameterAnnotations方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseParameterAnnotations

import sun.reflect.annotation.AnnotationParser; //导入方法依赖的package包/类
Annotation[][] parseParameterAnnotations(byte[] parameterAnnotations) {
    return AnnotationParser.parseParameterAnnotations(
           parameterAnnotations,
           sun.misc.SharedSecrets.getJavaLangAccess().
           getConstantPool(getDeclaringClass()),
           getDeclaringClass());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:Executable.java

示例2: parseParameterAnnotations

import sun.reflect.annotation.AnnotationParser; //导入方法依赖的package包/类
Annotation[][] parseParameterAnnotations(byte[] parameterAnnotations) {
    return AnnotationParser.parseParameterAnnotations(
           parameterAnnotations,
           SharedSecrets.getJavaLangAccess().
           getConstantPool(getDeclaringClass()),
           getDeclaringClass());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:Executable.java

示例3: getParameterAnnotations

import sun.reflect.annotation.AnnotationParser; //导入方法依赖的package包/类
/**
    * Returns an array of arrays that represent the annotations on the formal
    * parameters, in declaration order, of the method represented by
    * this <tt>Constructor</tt> object. (Returns an array of length zero if the
    * underlying method is parameterless.  If the method has one or more
    * parameters, a nested array of length zero is returned for each parameter
    * with no annotations.) The annotation objects contained in the returned
    * arrays are serializable.  The caller of this method is free to modify
    * the returned arrays; it will have no effect on the arrays returned to
    * other callers.
    *
    * @return an array of arrays that represent the annotations on the formal
    *    parameters, in declaration order, of the method represented by this
    *    Constructor object
    * @since 1.5
    */
   public Annotation[][] getParameterAnnotations() {
       int numParameters = parameterTypes.length;
       if (parameterAnnotations == null)
           return new Annotation[numParameters][0];

       Annotation[][] result = AnnotationParser.parseParameterAnnotations(
           parameterAnnotations,
           sun.misc.SharedSecrets.getJavaLangAccess().
               getConstantPool(getDeclaringClass()),
           getDeclaringClass());
       if (result.length != numParameters) {
    Class<?> declaringClass = getDeclaringClass();
    if (declaringClass.isEnum() || 
	declaringClass.isAnonymousClass() || 
	declaringClass.isLocalClass() )
	; // Can't do reliable parameter counting
    else { 
	if (!declaringClass.isMemberClass() || // top-level 
	    // Check for the enclosing instance parameter for
	    // non-static member classes
	    (declaringClass.isMemberClass() && 
	     ((declaringClass.getModifiers() & Modifier.STATIC) == 0)  && 
	     result.length + 1 != numParameters) ) {
	    throw new AnnotationFormatError(
		      "Parameter annotations don't match number of parameters");
	}
    }
}
       return result;
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:47,代码来源:Constructor.java

示例4: getParameterAnnotations

import sun.reflect.annotation.AnnotationParser; //导入方法依赖的package包/类
/**
 * Returns an array of arrays that represent the annotations on the formal
 * parameters, in declaration order, of the method represented by
 * this {@code Constructor} object. (Returns an array of length zero if the
 * underlying method is parameterless.  If the method has one or more
 * parameters, a nested array of length zero is returned for each parameter
 * with no annotations.) The annotation objects contained in the returned
 * arrays are serializable.  The caller of this method is free to modify
 * the returned arrays; it will have no effect on the arrays returned to
 * other callers.
 *
 * @return an array of arrays that represent the annotations on the formal
 *    parameters, in declaration order, of the method represented by this
 *    Constructor object
 * @since 1.5
 */
public Annotation[][] getParameterAnnotations() {
    int numParameters = parameterTypes.length;
    if (parameterAnnotations == null)
        return new Annotation[numParameters][0];

    Annotation[][] result = AnnotationParser.parseParameterAnnotations(
        parameterAnnotations,
        sun.misc.SharedSecrets.getJavaLangAccess().
            getConstantPool(getDeclaringClass()),
        getDeclaringClass());
    if (result.length != numParameters) {
        Class<?> declaringClass = getDeclaringClass();
        if (declaringClass.isEnum() ||
            declaringClass.isAnonymousClass() ||
            declaringClass.isLocalClass() )
            ; // Can't do reliable parameter counting
        else {
            if (!declaringClass.isMemberClass() || // top-level
                // Check for the enclosing instance parameter for
                // non-static member classes
                (declaringClass.isMemberClass() &&
                 ((declaringClass.getModifiers() & Modifier.STATIC) == 0)  &&
                 result.length + 1 != numParameters) ) {
                throw new AnnotationFormatError(
                          "Parameter annotations don't match number of parameters");
            }
        }
    }
    return result;
}
 
开发者ID:ZhaoX,项目名称:jdk-1.7-annotated,代码行数:47,代码来源:Constructor.java

示例5: getParameterAnnotations

import sun.reflect.annotation.AnnotationParser; //导入方法依赖的package包/类
/**
 * Returns an array of arrays that represent the annotations on the formal
 * parameters, in declaration order, of the method represented by
 * this <tt>Method</tt> object. (Returns an array of length zero if the
 * underlying method is parameterless.  If the method has one or more
 * parameters, a nested array of length zero is returned for each parameter
 * with no annotations.) The annotation objects contained in the returned
 * arrays are serializable.  The caller of this method is free to modify
 * the returned arrays; it will have no effect on the arrays returned to
 * other callers.
 *
 * @return an array of arrays that represent the annotations on the formal
 *    parameters, in declaration order, of the method represented by this
 *    Method object
 * @since 1.5
 */
public Annotation[][] getParameterAnnotations() {
    int numParameters = parameterTypes.length;
    if (parameterAnnotations == null)
        return new Annotation[numParameters][0];

    Annotation[][] result = AnnotationParser.parseParameterAnnotations(
        parameterAnnotations,
        sun.misc.SharedSecrets.getJavaLangAccess().
            getConstantPool(getDeclaringClass()),
        getDeclaringClass());
    if (result.length != numParameters)
        throw new java.lang.annotation.AnnotationFormatError(
            "Parameter annotations don't match number of parameters");
    return result;
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:32,代码来源:Method.java

示例6: getParameterAnnotations

import sun.reflect.annotation.AnnotationParser; //导入方法依赖的package包/类
/**
 * Returns an array of arrays that represent the annotations on the formal
 * parameters, in declaration order, of the method represented by
 * this {@code Method} object. (Returns an array of length zero if the
 * underlying method is parameterless.  If the method has one or more
 * parameters, a nested array of length zero is returned for each parameter
 * with no annotations.) The annotation objects contained in the returned
 * arrays are serializable.  The caller of this method is free to modify
 * the returned arrays; it will have no effect on the arrays returned to
 * other callers.
 *
 * @return an array of arrays that represent the annotations on the formal
 *    parameters, in declaration order, of the method represented by this
 *    Method object
 * @since 1.5
 */
public Annotation[][] getParameterAnnotations() {
    int numParameters = parameterTypes.length;
    if (parameterAnnotations == null)
        return new Annotation[numParameters][0];

    Annotation[][] result = AnnotationParser.parseParameterAnnotations(
        parameterAnnotations,
        sun.misc.SharedSecrets.getJavaLangAccess().
            getConstantPool(getDeclaringClass()),
        getDeclaringClass());
    if (result.length != numParameters)
        throw new java.lang.annotation.AnnotationFormatError(
            "Parameter annotations don't match number of parameters");
    return result;
}
 
开发者ID:ZhaoX,项目名称:jdk-1.7-annotated,代码行数:32,代码来源:Method.java


注:本文中的sun.reflect.annotation.AnnotationParser.parseParameterAnnotations方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。