Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.bcel.classfile
Class JavaClassDefinition  view JavaClassDefinition download JavaClassDefinition.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.bcel.classfile.JavaClassDefinition

public class JavaClassDefinition
extends java.lang.Object

Contains the definition of a org.apache.bcel.classfile.JavaClass and the definitions of Methods and Fields of the JavaClass


Field Summary
private  java.util.Map mFieldDefs
          field definitions, keyed on field name
private  org.apache.bcel.classfile.JavaClass mJavaClass
          the JavaClass
private  MethodDefinition[] mMethodDefs
          the method definitions
 
Constructor Summary
JavaClassDefinition(org.apache.bcel.classfile.JavaClass aJavaClass, java.util.Set aFieldScopes, java.util.Set aMethodScopes)
          Creates a JavaClassDefinition from a JavaClass.
 
Method Summary
 FieldDefinition findFieldDef(java.lang.String aFieldName)
          Finds a field definition.
 MethodDefinition findNarrowestMethod(java.lang.String aClassName, java.lang.String aMethodName, org.apache.bcel.generic.Type[] aArgTypes)
          Finds the narrowest method that is compatible with a method.
 FieldDefinition[] getFieldDefs()
          Gets the field definitions for Fields of the JavaClass.
 org.apache.bcel.classfile.JavaClass getJavaClass()
          Gets the JavaClass for this definition.
 MethodDefinition[] getMethodDefs()
          Gets the method definitions for Methods of the JavaClass.
 boolean hasReference(MethodDefinition aMethodDef, ReferenceDAO aReferenceDAO)
          Determines whether there is reference to a given Method in this JavaClass definition or a definition in a superclass.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mJavaClass

private org.apache.bcel.classfile.JavaClass mJavaClass
the JavaClass


mMethodDefs

private MethodDefinition[] mMethodDefs
the method definitions


mFieldDefs

private java.util.Map mFieldDefs
field definitions, keyed on field name

Constructor Detail

JavaClassDefinition

public JavaClassDefinition(org.apache.bcel.classfile.JavaClass aJavaClass,
                           java.util.Set aFieldScopes,
                           java.util.Set aMethodScopes)
Creates a JavaClassDefinition from a JavaClass. The fields and methods of the JavaClassDefinition are those whose scopes are in restricted sets of Scopes.

Method Detail

getJavaClass

public org.apache.bcel.classfile.JavaClass getJavaClass()
Gets the JavaClass for this definition.


getMethodDefs

public MethodDefinition[] getMethodDefs()
Gets the method definitions for Methods of the JavaClass.


getFieldDefs

public FieldDefinition[] getFieldDefs()
Gets the field definitions for Fields of the JavaClass.


findNarrowestMethod

public MethodDefinition findNarrowestMethod(java.lang.String aClassName,
                                            java.lang.String aMethodName,
                                            org.apache.bcel.generic.Type[] aArgTypes)
Finds the narrowest method that is compatible with a method. An invocation of the given method can be resolved as an invocation of the narrowest method.


findFieldDef

public FieldDefinition findFieldDef(java.lang.String aFieldName)
Finds a field definition.


hasReference

public boolean hasReference(MethodDefinition aMethodDef,
                            ReferenceDAO aReferenceDAO)
Determines whether there is reference to a given Method in this JavaClass definition or a definition in a superclass.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).