com.android.dx.cf.attrib.AttSourceFile Java Examples
The following examples show how to use
com.android.dx.cf.attrib.AttSourceFile.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StdAttributeFactory.java From Box with Apache License 2.0 | 6 votes |
/** * Parses a {@code SourceFile} attribute. */ private Attribute sourceFile(DirectClassFile cf, int offset, int length, ParseObserver observer) { if (length != 2) { throwBadLength(2); } ByteArray bytes = cf.getBytes(); ConstantPool pool = cf.getConstantPool(); int idx = bytes.getUnsignedShort(offset); CstString cst = (CstString) pool.get(idx); Attribute result = new AttSourceFile(cst); if (observer != null) { observer.parsed(bytes, offset, 2, "source: " + cst); } return result; }
Example #2
Source File: StdAttributeFactory.java From Box with Apache License 2.0 | 6 votes |
/** * Parses a {@code SourceFile} attribute. */ private Attribute sourceFile(DirectClassFile cf, int offset, int length, ParseObserver observer) { if (length != 2) { throwBadLength(2); } ByteArray bytes = cf.getBytes(); ConstantPool pool = cf.getConstantPool(); int idx = bytes.getUnsignedShort(offset); CstString cst = (CstString) pool.get(idx); Attribute result = new AttSourceFile(cst); if (observer != null) { observer.parsed(bytes, offset, 2, "source: " + cst); } return result; }
Example #3
Source File: StdAttributeFactory.java From J2ME-Loader with Apache License 2.0 | 6 votes |
/** * Parses a {@code SourceFile} attribute. */ private Attribute sourceFile(DirectClassFile cf, int offset, int length, ParseObserver observer) { if (length != 2) { throwBadLength(2); } ByteArray bytes = cf.getBytes(); ConstantPool pool = cf.getConstantPool(); int idx = bytes.getUnsignedShort(offset); CstString cst = (CstString) pool.get(idx); Attribute result = new AttSourceFile(cst); if (observer != null) { observer.parsed(bytes, offset, 2, "source: " + cst); } return result; }
Example #4
Source File: StdAttributeFactory.java From buck with Apache License 2.0 | 6 votes |
/** * Parses a {@code SourceFile} attribute. */ private Attribute sourceFile(DirectClassFile cf, int offset, int length, ParseObserver observer) { if (length != 2) { throwBadLength(2); } ByteArray bytes = cf.getBytes(); ConstantPool pool = cf.getConstantPool(); int idx = bytes.getUnsignedShort(offset); CstString cst = (CstString) pool.get(idx); Attribute result = new AttSourceFile(cst); if (observer != null) { observer.parsed(bytes, offset, 2, "source: " + cst); } return result; }
Example #5
Source File: DirectClassFile.java From Box with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public CstString getSourceFile() { AttributeList attribs = getAttributes(); Attribute attSf = attribs.findFirst(AttSourceFile.ATTRIBUTE_NAME); if (attSf instanceof AttSourceFile) { return ((AttSourceFile) attSf).getSourceFile(); } return null; }
Example #6
Source File: DirectClassFile.java From Box with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public CstString getSourceFile() { AttributeList attribs = getAttributes(); Attribute attSf = attribs.findFirst(AttSourceFile.ATTRIBUTE_NAME); if (attSf instanceof AttSourceFile) { return ((AttSourceFile) attSf).getSourceFile(); } return null; }
Example #7
Source File: DirectClassFile.java From J2ME-Loader with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public CstString getSourceFile() { AttributeList attribs = getAttributes(); Attribute attSf = attribs.findFirst(AttSourceFile.ATTRIBUTE_NAME); if (attSf instanceof AttSourceFile) { return ((AttSourceFile) attSf).getSourceFile(); } return null; }
Example #8
Source File: DirectClassFile.java From buck with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ public CstString getSourceFile() { AttributeList attribs = getAttributes(); Attribute attSf = attribs.findFirst(AttSourceFile.ATTRIBUTE_NAME); if (attSf instanceof AttSourceFile) { return ((AttSourceFile) attSf).getSourceFile(); } return null; }