private boolean hasRuntimeVisibleAnnotation(HasAttribute element) { Attribute att = element.getAttributes().findFirst( AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME); return (att != null && ((AttRuntimeVisibleAnnotations)att).getAnnotations().size()>0); } }
/** * 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"); } }
/** * 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"); } }
/** * 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"); } }
/** * 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"); } }
/** * 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"); } }
/** * 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"); } }
/** * 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"); } }
/** * 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"); } }
private boolean hasRuntimeVisibleAnnotation(HasAttribute element) { Attribute att = element.getAttributes().findFirst( AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME); return (att != null && ((AttRuntimeVisibleAnnotations)att).getAnnotations().size()>0); } }
private boolean hasRuntimeVisibleAnnotation(HasAttribute element) { Attribute att = element.getAttributes().findFirst( AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME); return (att != null && ((AttRuntimeVisibleAnnotations)att).getAnnotations().size()>0); } }
/** * 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++; } }
/** * 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++; } }
/** * 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++; } }
/** * 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++; } }
/** * 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++; } }
/** * 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++; } }
/** * 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++; } }
/** * 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++; } }
if (classAnnotations.size() != 0) { out.setClassAnnotations(classAnnotations);