org.apache.commons.classscan.bcel
Class BcelClass

java.lang.Object
  extended by org.apache.commons.classscan.bcel.BcelClass
All Implemented Interfaces:
HasName, MetaClass, MetaType, HasResolve, SpiMetaClass

public class BcelClass
extends Object
implements SpiMetaClass


Constructor Summary
BcelClass(MetaClassPathElement location, org.apache.bcel.classfile.ClassParser parser)
           
 
Method Summary
 boolean equals(Object obj)
           
 MetaAnnotation getAnnotation(String annotationName)
          Get metadata about a particular annotation on the corresponding Class.
 Set<? extends MetaAnnotation> getAnnotations()
          Get metadata about the annotations on the corresponding Class.
 MetaClassPathElement getClassLocation()
          Get the ClassLocation from which the corresponding class came.
 Set<? extends MetaField> getFields()
          Get metadata about the corresponding Class's methods and constructors.
 Set<MetaClass> getInterfaces()
          Get metadata about the interfaces which the corresponding Class implements.
 Set<? extends MetaMethod> getMethods()
          Get metadata about the corresponding Class's methods and constructors.
 String getName()
          Get the canonical name of the corresponding Class.
 MetaClass getParent()
          Get metadata about the corresponding Class's parent
 int hashCode()
           
 boolean isAssignableFrom(MetaClass assignor)
          Is the associated Class assignable from the class associated with the given MetaClass.
 boolean resolve(SpiMetaClassLoader classLoader)
          Resolve names into model entries
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BcelClass

public BcelClass(MetaClassPathElement location,
                 org.apache.bcel.classfile.ClassParser parser)
          throws org.apache.bcel.classfile.ClassFormatException,
                 IOException
Throws:
org.apache.bcel.classfile.ClassFormatException
IOException
Method Detail

resolve

public boolean resolve(SpiMetaClassLoader classLoader)
Description copied from interface: HasResolve
Resolve names into model entries

Specified by:
resolve in interface HasResolve

getClassLocation

public MetaClassPathElement getClassLocation()
Description copied from interface: MetaClass
Get the ClassLocation from which the corresponding class came. For primitive types, this will return null.

Specified by:
getClassLocation in interface MetaClass

getName

public String getName()
Description copied from interface: MetaClass
Get the canonical name of the corresponding Class. For primitive types, this will be the primitive type name. e.g. char

Specified by:
getName in interface HasName
Specified by:
getName in interface MetaClass

getParent

public MetaClass getParent()
Description copied from interface: MetaClass
Get metadata about the corresponding Class's parent

Specified by:
getParent in interface MetaClass
Returns:
The MetaClass, or null if the corresponding Class is a primitive type or Object.class

getInterfaces

public Set<MetaClass> getInterfaces()
Description copied from interface: MetaClass
Get metadata about the interfaces which the corresponding Class implements. No inherited interfaces will be in the set.

Specified by:
getInterfaces in interface MetaClass
Returns:
A read-only set of the interface information

getAnnotations

public Set<? extends MetaAnnotation> getAnnotations()
Description copied from interface: MetaClass
Get metadata about the annotations on the corresponding Class.

Specified by:
getAnnotations in interface MetaClass
Returns:
A read-only set of the annotation information

getAnnotation

public MetaAnnotation getAnnotation(String annotationName)
Description copied from interface: MetaClass
Get metadata about a particular annotation on the corresponding Class.

Specified by:
getAnnotation in interface MetaClass
Parameters:
annotationName - The name of the annotation desired
Returns:
The annotation information, or null if not specified on the corresponding Class

getMethods

public Set<? extends MetaMethod> getMethods()
Description copied from interface: MetaClass
Get metadata about the corresponding Class's methods and constructors. No inherited methods will be in the set.

Specified by:
getMethods in interface MetaClass
Returns:
A read-only set of the method information

getFields

public Set<? extends MetaField> getFields()
Description copied from interface: MetaClass
Get metadata about the corresponding Class's methods and constructors. No inherited fields will be in the set.

Specified by:
getFields in interface MetaClass
Returns:
A read-only set of the field information

isAssignableFrom

public boolean isAssignableFrom(MetaClass assignor)
Description copied from interface: MetaClass
Is the associated Class assignable from the class associated with the given MetaClass.

Specified by:
isAssignableFrom in interface MetaClass
Parameters:
assignor - The non-null MetaClass (associated with class or interface)
Returns:
true, if and only if instances represented by implementor can be assigned to instances represented by this MetaClass

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.