    001/*
    002 *  Licensed to the Apache Software Foundation (ASF) under one or more
    003 *  contributor license agreements.  See the NOTICE file distributed with
    004 *  this work for additional information regarding copyright ownership.
    005 *  The ASF licenses this file to You under the Apache License, Version 2.0
    006 *  (the "License"); you may not use this file except in compliance with
    007 *  the License.  You may obtain a copy of the License at
    008 *
    009 *     http://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 *  Unless required by applicable law or agreed to in writing, software
    012 *  distributed under the License is distributed on an "AS IS" BASIS,
    013 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 *  See the License for the specific language governing permissions and
    015 *  limitations under the License.
    016 */
    017package org.apache.commons.compress.harmony.unpack200.bytecode;
    018
    019import java.io.DataOutputStream;
    020import java.io.IOException;
    021
    022/**
    023 * Deprecated class file attribute.
    024 */
    025public class DeprecatedAttribute extends Attribute {
    026
    027    private static CPUTF8 attributeName;
    028
    029    public static void setAttributeName(final CPUTF8 cpUTF8Value) {
    030        attributeName = cpUTF8Value;
    031    }
    032
    033    public DeprecatedAttribute() {
    034        super(attributeName);
    035    }
    036
    037    /*
    038     * (non-Javadoc)
    039     *
    040     * @see org.apache.commons.compress.harmony.unpack200.bytecode.Attribute#getLength()
    041     */
    042    @Override
    043    protected int getLength() {
    044        return 0;
    045    }
    046
    047    /*
    048     * (non-Javadoc)
    049     *
    050     * @see org.apache.commons.compress.harmony.unpack200.bytecode.Attribute#writeBody(java.io.DataOutputStream)
    051     */
    052    @Override
    053    protected void writeBody(final DataOutputStream dos) throws IOException {
    054        // No body
    055    }
    056
    057    /*
    058     * (non-Javadoc)
    059     *
    060     * @see org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry#toString()
    061     */
    062    @Override
    063    public String toString() {
    064        return "Deprecated Attribute";
    065    }
    066
    067}