com.android.dx.rop.annotation.Annotations.size()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中com.android.dx.rop.annotation.Annotations.size()方法的一些代码示例,展示了Annotations.size()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotations.size()方法的具体详情如下:
包路径:com.android.dx.rop.annotation.Annotations
类名称:Annotations
方法名:size

Annotations.size介绍

[英]Gets the number of elements in this instance.
[中]获取此实例中的元素数。

代码示例

代码示例来源:origin: dodola/RocooFix

private boolean hasRuntimeVisibleAnnotation(HasAttribute element) {
    Attribute att = element.getAttributes().findFirst(
        AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME);
    return (att != null && ((AttRuntimeVisibleAnnotations)att).getAnnotations().size()>0);
  }
}

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: com.android/dx

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: com.google.android.tools/dx

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: gdpancheng/LoonAndroid3

/**
 * Gets the write size for the given set.
 *
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: dragome/dragome-sdk

/**
 * Gets the write size for the given set.
 * 
 * @param annotations {@code non-null;} the set
 * @return {@code > 0;} the write size
 */
private static int writeSize(Annotations annotations) {
  // This includes an int size at the start of the list.
  try {
    return (annotations.size() * ENTRY_WRITE_SIZE) + 4;
  } catch (NullPointerException ex) {
    // Elucidate the exception.
    throw new NullPointerException("list == null");
  }
}

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

private boolean hasRuntimeVisibleAnnotation(HasAttribute element) {
    Attribute att = element.getAttributes().findFirst(
        AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME);
    return (att != null && ((AttRuntimeVisibleAnnotations)att).getAnnotations().size()>0);
  }
}

代码示例来源:origin: com.android.tools.build/builder

private boolean hasRuntimeVisibleAnnotation(HasAttribute element) {
    Attribute att = element.getAttributes().findFirst(
        AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME);
    return (att != null && ((AttRuntimeVisibleAnnotations)att).getAnnotations().size()>0);
  }
}

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 */
public AnnotationSetItem(Annotations annotations) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a);
    at++;
  }
}

代码示例来源:origin: gdpancheng/LoonAndroid3

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 */
public AnnotationSetItem(Annotations annotations) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a);
    at++;
  }
}

代码示例来源:origin: com.google.android.tools/dx

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 */
public AnnotationSetItem(Annotations annotations) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a);
    at++;
  }
}

代码示例来源:origin: dragome/dragome-sdk

/**
 * Constructs an instance.
 * 
 * @param annotations {@code non-null;} set of annotations
 */
public AnnotationSetItem(Annotations annotations) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a);
    at++;
  }
}

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 * @param dexFile {@code non-null;} dex output
 */
public AnnotationSetItem(Annotations annotations, DexFile dexFile) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a, dexFile);
    at++;
  }
}

代码示例来源:origin: com.android/dx

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 * @param dexFile {@code non-null;} dex output
 */
public AnnotationSetItem(Annotations annotations, DexFile dexFile) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a, dexFile);
    at++;
  }
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 * @param dexFile {@code non-null;} dex output
 */
public AnnotationSetItem(Annotations annotations, DexFile dexFile) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a, dexFile);
    at++;
  }
}

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * Constructs an instance.
 *
 * @param annotations {@code non-null;} set of annotations
 * @param dexFile {@code non-null;} dex output
 */
public AnnotationSetItem(Annotations annotations, DexFile dexFile) {
  super(ALIGNMENT, writeSize(annotations));
  this.annotations = annotations;
  this.items = new AnnotationItem[annotations.size()];
  int at = 0;
  for (Annotation a : annotations.getAnnotations()) {
    items[at] = new AnnotationItem(a, dexFile);
    at++;
  }
}

代码示例来源:origin: com.google.android.tools/dx

if (classAnnotations.size() != 0) {
  out.setClassAnnotations(classAnnotations);

相关文章