@SuppressWarnings("unchecked") public static <T extends SourceAttribute> T find(final String name, final List<SourceAttribute> attributes) { VerifyArgument.notNull(name, "name"); VerifyArgument.noNullElements(attributes, "attributes"); for (final SourceAttribute attribute : attributes) { if (name.equals(attribute.getName())) { return (T) attribute; } } return null; }
@SuppressWarnings("unchecked") public static <T extends SourceAttribute> T find(final String name, final SourceAttribute... attributes) { VerifyArgument.notNull(name, "name"); VerifyArgument.noNullElements(attributes, "attributes"); for (final SourceAttribute attribute : attributes) { if (name.equals(attribute.getName())) { return (T) attribute; } } return null; }
@SuppressWarnings("unchecked") public static <T extends SourceAttribute> T find(final String name, final List<SourceAttribute> attributes) { VerifyArgument.notNull(name, "name"); VerifyArgument.noNullElements(attributes, "attributes"); for (final SourceAttribute attribute : attributes) { if (name.equals(attribute.getName())) { return (T) attribute; } } return null; }
@SuppressWarnings("unchecked") public static <T extends SourceAttribute> T find(final String name, final SourceAttribute... attributes) { VerifyArgument.notNull(name, "name"); VerifyArgument.noNullElements(attributes, "attributes"); for (final SourceAttribute attribute : attributes) { if (name.equals(attribute.getName())) { return (T) attribute; } } return null; }
@SuppressWarnings("unchecked") public static <T extends SourceAttribute> T find(final String name, final List<SourceAttribute> attributes) { VerifyArgument.notNull(name, "name"); VerifyArgument.noNullElements(attributes, "attributes"); for (final SourceAttribute attribute : attributes) { if (name.equals(attribute.getName())) { return (T) attribute; } } return null; }
@SuppressWarnings("unchecked") public static <T extends SourceAttribute> T find(final String name, final SourceAttribute... attributes) { VerifyArgument.notNull(name, "name"); VerifyArgument.noNullElements(attributes, "attributes"); for (final SourceAttribute attribute : attributes) { if (name.equals(attribute.getName())) { return (T) attribute; } } return null; }
i, readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(),
protected final SourceAttribute inflateAttribute(final Buffer buffer, final SourceAttribute attribute) { if (attribute instanceof BlobAttribute) { buffer.reset(attribute.getLength()); final BlobAttribute blobAttribute = (BlobAttribute) attribute; System.arraycopy( blobAttribute.getData(), 0, buffer.array(), 0, attribute.getLength() ); return readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(), attribute.getLength() ); } return attribute; }
protected final SourceAttribute inflateAttribute(final Buffer buffer, final SourceAttribute attribute) { if (attribute instanceof BlobAttribute) { buffer.reset(attribute.getLength()); final BlobAttribute blobAttribute = (BlobAttribute) attribute; System.arraycopy( blobAttribute.getData(), 0, buffer.array(), 0, attribute.getLength() ); return readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(), attribute.getLength() ); } return attribute; }
protected final SourceAttribute inflateAttribute(final Buffer buffer, final SourceAttribute attribute) { if (attribute instanceof BlobAttribute) { buffer.reset(attribute.getLength()); final BlobAttribute blobAttribute = (BlobAttribute) attribute; System.arraycopy( blobAttribute.getData(), 0, buffer.array(), 0, attribute.getLength() ); return readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(), attribute.getLength() ); } return attribute; }
i, readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(),
i, readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(),
private void writeFieldAttribute(final ITextOutput output, final FieldDefinition field, final SourceAttribute attribute) { switch (attribute.getName()) { case AttributeNames.ConstantValue: { final Object constantValue = ((ConstantValueAttribute) attribute).getValue();
private void writeFieldAttribute(final ITextOutput output, final FieldDefinition field, final SourceAttribute attribute) { switch (attribute.getName()) { case AttributeNames.ConstantValue: { final Object constantValue = ((ConstantValueAttribute) attribute).getValue();
switch (attribute.getName()) { case AttributeNames.ConstantValue: { final Object constantValue = ((ConstantValueAttribute) attribute).getValue();
@SuppressWarnings("ConstantConditions") private void writeMethodAttribute(final ITextOutput output, final MethodDefinition method, final SourceAttribute attribute) { switch (attribute.getName()) { case AttributeNames.Exceptions: { final ExceptionsAttribute exceptionsAttribute = (ExceptionsAttribute) attribute; if (attribute.getName().equals(AttributeNames.LocalVariableTypeTable)) { signature = type.getSignature(); output.writeAttribute(attribute.getName()); output.writeLine(":"); final VariableDefinitionCollection variables = body != null ? body.getVariables() : null; if (attribute.getName().equals(AttributeNames.LocalVariableTypeTable)) { nameSyntax = NameSyntax.SIGNATURE; output.writeAttribute(attribute.getName()); output.writeLine(":"); final String signature = ((SignatureAttribute) attribute).getSignature(); output.writeAttribute(attribute.getName()); output.writeLine(":"); output.indent();
@SuppressWarnings("ConstantConditions") private void writeMethodAttribute(final ITextOutput output, final MethodDefinition method, final SourceAttribute attribute) { switch (attribute.getName()) { case AttributeNames.Exceptions: { final ExceptionsAttribute exceptionsAttribute = (ExceptionsAttribute) attribute; if (attribute.getName().equals(AttributeNames.LocalVariableTypeTable)) { signature = type.getSignature(); output.writeAttribute(attribute.getName()); output.writeLine(":"); final VariableDefinitionCollection variables = body != null ? body.getVariables() : null; if (attribute.getName().equals(AttributeNames.LocalVariableTypeTable)) { nameSyntax = NameSyntax.SIGNATURE; output.writeAttribute(attribute.getName()); output.writeLine(":"); final String signature = ((SignatureAttribute) attribute).getSignature(); output.writeAttribute(attribute.getName()); output.writeLine(":"); output.indent();
switch (attribute.getName()) { case AttributeNames.SourceFile: { output.writeAttribute("SourceFile");
switch (attribute.getName()) { case AttributeNames.SourceFile: { output.writeAttribute("SourceFile");
switch (attribute.getName()) { case AttributeNames.SourceFile: { output.writeAttribute(AttributeNames.SourceFile);