|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun * Microsystems, Inc. All Rights Reserved. */ /* * SymbolInfo.java * * Created on April 19, 2004, 2:05 PM */ package org.netbeans.lib.java.parser; /** This class is common ancesor for classes encapsulaion semantic information about * Java elements. It defines constants for Java elements it can contain. * @author Tomas Hurka */ public abstract class SymbolInfo { public static final int PACKAGE=0; public static final int JAVACLASS=1; public static final int FIELD=2; public static final int METHOD=3; public static final int CONSTRUCTOR=4; public static final int PARAMETER=5; public static final int LOCVAR=6; public static final int TYPEPARAMETER=7; /** holds type of Java element. It is one of PACKAGE, JAVACLASS, * FIELD, METHOD, CONSTRUCTOR, PARAMETER, LOCVAR or TYPEPARAMETER */ public final int type; public SymbolInfo(int t) { type=t; } public String toString() { String cls = this.getClass().getName(); int i = cls.lastIndexOf('.'); if (i > -1) cls = cls.substring(i+1); switch (type) { case PACKAGE: return cls + ":PACKAGE"; case JAVACLASS: return cls + ":JAVACLASS"; case FIELD: return cls + ":FIELD"; case METHOD: return cls + ":METHOD"; case CONSTRUCTOR: return cls + ":CONSTRUCTOR"; case PARAMETER: return cls + ":PARAMETER"; case LOCVAR: return cls + ":LOCVAR"; case TYPEPARAMETER: return cls + ":TYPEPARAMETER"; default: return cls + ": |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.