package org.khelekore.jsizer;

/** information about a class. */
class ClassSize {
    private String className;
    private String superName;
    private int numFields;
    private int numMethods;
    private int numMethodLines;
    
    public ClassSize (String className, String superName,
		      int numFields, int numMethods, int numMethodLines) {
	if (className == null)
	    throw new IllegalArgumentException ("name may not be null");
	this.className = className;
	if (numFields < 0)
	    throw new IllegalArgumentException ("numFields may not be " + 
						"negative: " + numFields);
	this.numFields = numFields;
	if (numMethods < 0)
	    throw new IllegalArgumentException ("numMethods may not be " + 
						"negative: " + numMethods);
	this.numMethods = numMethods;
	if (numMethodLines < 0)
	    throw new IllegalArgumentException ("numMethodLines may not be " + 
						"negative: " + numMethodLines);
	this.numMethodLines = numMethodLines;
    }

    public String getClassName () {
	return className;
    }

    public String getSuperName () {
	return superName;
    }

    public int getNumFields () {
	return numFields;
    }

    public int getNumMethods () {
	return numMethods;
    }

    public int getNumMethodLines () {
	return numMethodLines;
    }
}
