net.sf.clirr.core.internal.bcel
Class BcelJavaType

java.lang.Object
  extended by net.sf.clirr.core.internal.bcel.BcelJavaType
All Implemented Interfaces:
JavaType, Named, Scoped

public final class BcelJavaType
extends java.lang.Object
implements JavaType


Constructor Summary
BcelJavaType(org.apache.bcel.classfile.JavaClass clazz)
           
BcelJavaType(org.apache.bcel.generic.Type bcelType, org.apache.bcel.util.Repository repository)
           
 
Method Summary
 JavaType[] getAllInterfaces()
          Return the list of all interfaces this class implements.
 JavaType getContainingClass()
          The containing class if this is an inner class.
 Scope getDeclaredScope()
          The declared scope of this entity.
 Scope getEffectiveScope()
          The effective Scope of this entity.
 Field[] getFields()
          All fields that are declared by this class.
 JavaType[] getInnerClasses()
           
 Method[] getMethods()
          All methods that are declared by this class.
 java.lang.String getName()
          Type fully qualified class name.
 JavaType[] getSuperClasses()
          Return the superclasses of this class.
 boolean isAbstract()
           
 boolean isArray()
           
 boolean isFinal()
           
 boolean isInterface()
           
 boolean isPrimitive()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BcelJavaType

public BcelJavaType(org.apache.bcel.generic.Type bcelType,
                    org.apache.bcel.util.Repository repository)

BcelJavaType

public BcelJavaType(org.apache.bcel.classfile.JavaClass clazz)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: JavaType
Type fully qualified class name.

Specified by:
getName in interface JavaType
Specified by:
getName in interface Named
Returns:
a fully qualified class name, like "my.company.procuct.SampleClass".

getContainingClass

public JavaType getContainingClass()
Description copied from interface: JavaType
The containing class if this is an inner class.

Specified by:
getContainingClass in interface JavaType
Returns:
the containing class or null if this JavaType does not represent an inner class.

getSuperClasses

public JavaType[] getSuperClasses()
Description copied from interface: JavaType
Return the superclasses of this class.

Specified by:
getSuperClasses in interface JavaType
Returns:
the chain of superclasses of this type, starting from the direct superclass and ending with java.lang.Object.

getAllInterfaces

public JavaType[] getAllInterfaces()
Description copied from interface: JavaType
Return the list of all interfaces this class implements.

Specified by:
getAllInterfaces in interface JavaType
Returns:
the list of all interfaces this class implements/extends, excluding this if this JavaType represents an interface itself.

getInnerClasses

public JavaType[] getInnerClasses()
Specified by:
getInnerClasses in interface JavaType

getMethods

public Method[] getMethods()
Description copied from interface: JavaType
All methods that are declared by this class. Methods of superclasses/interfaces are not returned if they are not overridden/redeclared here.

Specified by:
getMethods in interface JavaType
Returns:
all methods that are declared by this class.

getFields

public Field[] getFields()
Description copied from interface: JavaType
All fields that are declared by this class. Fields of superclasses/interfaces are not returned.

Specified by:
getFields in interface JavaType
Returns:
all fields that are declared by this class.

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in interface JavaType

isArray

public boolean isArray()
Specified by:
isArray in interface JavaType

isFinal

public boolean isFinal()
Specified by:
isFinal in interface JavaType

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface JavaType

isInterface

public boolean isInterface()
Specified by:
isInterface in interface JavaType

getDeclaredScope

public Scope getDeclaredScope()
Description copied from interface: Scoped
The declared scope of this entity.

Specified by:
getDeclaredScope in interface Scoped
Returns:
the scope that appears in the modifiers of this entity.

getEffectiveScope

public Scope getEffectiveScope()
Description copied from interface: Scoped
The effective Scope of this entity.

Specified by:
getEffectiveScope in interface Scoped
Returns:
the minimum scope of the modifiers of this entity and it's all of it's containers.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2011 Lars K??hne. All Rights Reserved.