Click here to Skip to main content
15,892,674 members
Articles / Web Development / HTML

Java Class Viewer

Rate me:
Please Sign up or sign in to vote.
4.93/5 (41 votes)
21 Jun 2016MIT8 min read 178.9K   7.8K   96  
Watch the Java class file visually & interactively for the meaning of every byte
/*
 * ClassComponent.java    8:51 PM, August 7, 2007
 *
 * Copyright  2007, FreeInternals.org. All rights reserved.
 * Use is subject to license terms.
 */
package org.freeinternals.format.classfile;

/**
 * Super class for all components in a class file. This class has two fields:
 * {@code startPos} indecates the start index in the class file byte array
 * of current component; {@code length} is
 *
 *
 * @author Amos Shi
 * @since JDK 6.0
 */
public class ClassComponent {

    /**
     * Start position in the class file byte array of current component.
     */
    transient protected int startPos;
    /**
     * Length of current component.
     */
    transient protected int length;

    ClassComponent() {
        this.startPos = 0;
        this.length = 0;
    }

    /**
     * Get the start position of current component.
     *
     * @return The start position
     */
    public int getStartPos() {
        return this.startPos;
    }

    /**
     * Get the length of current component.
     *
     * @return The length
     */
    public int getLength() {
        return this.length;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
United States United States
Deliver useful software to the world.

Comments and Discussions