alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (JLocalVariable.java)

This example Scala source code file (JLocalVariable.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

jlocalvariable, jlocalvariable, jmethod, jmethod, jtype, jtype, string, string

The Scala JLocalVariable.java source code

/* FJBG -- Fast Java Bytecode Generator
 * Copyright 2002-2011 LAMP/EPFL
 * @author  Michel Schinz
 */

package ch.epfl.lamp.fjbg;

/**
 * Representation of a local variable or method argument.
 *
 * @author Michel Schinz
 * @version 1.0
 */

public class JLocalVariable {
    protected final JMethod owner;
    protected final JType type;
    protected final String name;
    protected final int index;

    protected JLocalVariable(FJBGContext context,
                             JMethod owner,
                             JType type,
                             String name,
                             int index) {
        this.owner = owner;
        this.type = type;
        this.name = name;
        this.index = index;

        assert index < 0xFFFF : "index too big for local variable: " + index;
    }

    public JMethod getOwner() { return owner; }
    public int getIndex() { return index; }
    public String getName() { return name; }
    public JType getType() { return type; }

    /*@Override*/ public String toString() {
        return "0\t"+type.getSize()+"\t"+index+"\t"+name+"\t"+type;
    }
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala JLocalVariable.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.