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

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

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

Annotations.throwIfImmutable介绍

暂无

代码示例

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 *
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds all of the elements of the given instance to this one. The
 * instances must not have any duplicate types.
 * 
 * @param toAdd {@code non-null;} the annotations to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void addAll(Annotations toAdd) {
  throwIfImmutable();
  if (toAdd == null) {
    throw new NullPointerException("toAdd == null");
  }
  for (Annotation a : toAdd.annotations.values()) {
    add(a);
  }
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 * 
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

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

/**
 * Adds an element to this instance. There must not already be an
 * element of the same type.
 *
 * @param annotation {@code non-null;} the element to add
 * @throws IllegalArgumentException thrown if there is a duplicate type
 */
public void add(Annotation annotation) {
  throwIfImmutable();
  if (annotation == null) {
    throw new NullPointerException("annotation == null");
  }
  CstType type = annotation.getType();
  if (annotations.containsKey(type)) {
    throw new IllegalArgumentException("duplicate type: " +
        type.toHuman());
  }
  annotations.put(type, annotation);
}

相关文章