/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); IndexedItem result = strings.get((CstString) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** * Gets the index of the given string, which must have been added * to this instance. * * @param string {@code non-null;} the string to look up * @return {@code >= 0;} the string's index */ public int indexOf(CstString string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfNotPrepared(); StringIdItem s = strings.get(string); if (s == null) { throw new IllegalArgumentException("not found"); } return s.getIndex(); }
/** {@inheritDoc} */ @Override public IndexedItem get(Constant cst) { if (cst == null) { throw new NullPointerException("cst == null"); } throwIfNotPrepared(); if (cst instanceof CstString) { cst = ((CstString) cst).getString(); } IndexedItem result = strings.get((CstUtf8) cst); if (result == null) { throw new IllegalArgumentException("not found"); } return result; }
/** * Gets the index of the given string, which must have been added * to this instance. * * @param string {@code non-null;} the string to look up * @return {@code >= 0;} the string's index */ public int indexOf(CstString string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfNotPrepared(); StringIdItem s = strings.get(string); if (s == null) { throw new IllegalArgumentException("not found"); } return s.getIndex(); }
/** * Gets the index of the given string, which must have been added * to this instance. * * @param string {@code non-null;} the string to look up * @return {@code >= 0;} the string's index */ public int indexOf(CstString string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfNotPrepared(); StringIdItem s = strings.get(string); if (s == null) { throw new IllegalArgumentException("not found"); } return s.getIndex(); }
/** * Gets the index of the given string, which must have been added * to this instance. * * @param string {@code non-null;} the string to look up * @return {@code >= 0;} the string's index */ public int indexOf(CstUtf8 string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfNotPrepared(); StringIdItem s = strings.get(string); if (s == null) { throw new IllegalArgumentException("not found"); } return s.getIndex(); }
/** * Gets the index of the given string, which must have been added * to this instance. * * @param string {@code non-null;} the string to look up * @return {@code >= 0;} the string's index */ public int indexOf(CstString string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfNotPrepared(); StringIdItem s = strings.get(string); if (s == null) { throw new IllegalArgumentException("not found"); } return s.getIndex(); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }
/** * Writes the portion of the file header that refers to this instance. * * @param out {@code non-null;} where to write */ public void writeHeaderPart(AnnotatedOutput out) { throwIfNotPrepared(); int sz = strings.size(); int offset = (sz == 0) ? 0 : getFileOffset(); if (out.annotates()) { out.annotate(4, "string_ids_size: " + Hex.u4(sz)); out.annotate(4, "string_ids_off: " + Hex.u4(offset)); } out.writeInt(sz); out.writeInt(offset); }