org.apache.felix.scrplugin.tags.qdox
Class QDoxJavaClassDescription

java.lang.Object
  extended by org.apache.felix.scrplugin.tags.qdox.QDoxJavaClassDescription
All Implemented Interfaces:
JavaClassDescription, ModifiableJavaClassDescription
Direct Known Subclasses:
AnnotationJavaClassDescription

public class QDoxJavaClassDescription
extends Object
implements JavaClassDescription, ModifiableJavaClassDescription

QDoxJavaClassDescription.java...


Field Summary
protected  Class<?> clazz
          The compiled class.
protected  com.thoughtworks.qdox.model.JavaClass javaClass
           
protected  JavaClassDescriptorManager manager
           
 
Fields inherited from interface org.apache.felix.scrplugin.tags.JavaClassDescription
EMPTY_RESULT
 
Constructor Summary
QDoxJavaClassDescription(Class<?> clazz, com.thoughtworks.qdox.model.JavaClass javaClass, JavaClassDescriptorManager m)
           
 
Method Summary
 void addMethods(String propertyName, String className, boolean createBind, boolean createUnbind)
           
protected  void createMethod(org.objectweb.asm.ClassWriter cw, String propertyName, String typeName, boolean bind)
           
 Class<?> getCompiledClass()
           
 JavaField getExternalFieldByName(String name)
           
 JavaField getFieldByName(String name)
          Get the field with the name.
 JavaField[] getFields()
          Get the fields of this class
 JavaClassDescription[] getImplementedInterfaces()
          Returns an array of the implemented interfaces of this class.
 JavaMethod getMethodBySignature(String name, String[] parameters)
          Search for a method with the given signature.
 JavaMethod[] getMethods()
          Return all methods of this class
 String getName()
          Get the name of the described class.
 JavaClassDescription getReferencedClass(String referencedName)
          Search for the class.
 JavaClassDescription getSuperClass()
          Get the description for the parent class.
 JavaTag getTagByName(String name)
          Get the java class tag with the name.
 JavaTag[] getTagsByName(String name, boolean inherited)
          Get all class tags with this name.
 boolean isA(String type)
          Is this class of the type?
 boolean isAbstract()
          Is this class abstract?
 boolean isInterface()
          Is this class an interface?
 boolean isPublic()
          Is this class public?
protected  String searchImport(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

javaClass

protected final com.thoughtworks.qdox.model.JavaClass javaClass

manager

protected final JavaClassDescriptorManager manager

clazz

protected final Class<?> clazz
The compiled class.

Constructor Detail

QDoxJavaClassDescription

public QDoxJavaClassDescription(Class<?> clazz,
                                com.thoughtworks.qdox.model.JavaClass javaClass,
                                JavaClassDescriptorManager m)
Method Detail

getSuperClass

public JavaClassDescription getSuperClass()
                                   throws SCRDescriptorException
Description copied from interface: JavaClassDescription
Get the description for the parent class.

Specified by:
getSuperClass in interface JavaClassDescription
Returns:
The description or null if this class is the Object class.
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.getSuperClass()

getTagByName

public JavaTag getTagByName(String name)
Description copied from interface: JavaClassDescription
Get the java class tag with the name.

Specified by:
getTagByName in interface JavaClassDescription
Returns:
the tag or null.
See Also:
JavaClassDescription.getTagByName(java.lang.String)

getName

public String getName()
Description copied from interface: JavaClassDescription
Get the name of the described class.

Specified by:
getName in interface JavaClassDescription
Returns:
The name of the described class.
See Also:
JavaClassDescription.getName()

getTagsByName

public JavaTag[] getTagsByName(String name,
                               boolean inherited)
                        throws SCRDescriptorException
Description copied from interface: JavaClassDescription
Get all class tags with this name.

Specified by:
getTagsByName in interface JavaClassDescription
inherited - If true, parent classes are searched as well.
Returns:
An array of tags or the empty array.
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.getTagsByName(java.lang.String, boolean)

getFields

public JavaField[] getFields()
Description copied from interface: JavaClassDescription
Get the fields of this class

Specified by:
getFields in interface JavaClassDescription
Returns:
All fields or an empty array
See Also:
JavaClassDescription.getFields()

getFieldByName

public JavaField getFieldByName(String name)
                         throws SCRDescriptorException
Description copied from interface: JavaClassDescription
Get the field with the name.

Specified by:
getFieldByName in interface JavaClassDescription
Parameters:
name - The name of the field
Returns:
The field with the name or null.
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.getFieldByName(java.lang.String)

getExternalFieldByName

public JavaField getExternalFieldByName(String name)
                                 throws SCRDescriptorException
Specified by:
getExternalFieldByName in interface JavaClassDescription
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.getExternalFieldByName(java.lang.String)

searchImport

protected String searchImport(String name)

getReferencedClass

public JavaClassDescription getReferencedClass(String referencedName)
Description copied from interface: JavaClassDescription
Search for the class. If the referenced name is not fully qualified, the imports of the class are searched.

Specified by:
getReferencedClass in interface JavaClassDescription
Returns:
The java class description or null
See Also:
JavaClassDescription.getReferencedClass(java.lang.String)

getImplementedInterfaces

public JavaClassDescription[] getImplementedInterfaces()
                                                throws SCRDescriptorException
Description copied from interface: JavaClassDescription
Returns an array of the implemented interfaces of this class.

Specified by:
getImplementedInterfaces in interface JavaClassDescription
Returns:
An array containing the interfaces or an empty array if this class does not implement any interface.
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.getImplementedInterfaces()

getMethodBySignature

public JavaMethod getMethodBySignature(String name,
                                       String[] parameters)
                                throws SCRDescriptorException
Description copied from interface: JavaClassDescription
Search for a method with the given signature.

Specified by:
getMethodBySignature in interface JavaClassDescription
Returns:
A descriptor for the method or null
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.getMethodBySignature(java.lang.String, java.lang.String[])

getMethods

public JavaMethod[] getMethods()
Description copied from interface: JavaClassDescription
Return all methods of this class

Specified by:
getMethods in interface JavaClassDescription
Returns:
An array of methods or an empty array.
See Also:
JavaClassDescription.getMethods()

isA

public boolean isA(String type)
            throws SCRDescriptorException
Description copied from interface: JavaClassDescription
Is this class of the type?

Specified by:
isA in interface JavaClassDescription
Returns:
True if this class is of the type.
Throws:
SCRDescriptorException
See Also:
JavaClassDescription.isA(java.lang.String)

isAbstract

public boolean isAbstract()
Description copied from interface: JavaClassDescription
Is this class abstract?

Specified by:
isAbstract in interface JavaClassDescription
Returns:
True if this class is abstract.
See Also:
JavaClassDescription.isAbstract()

isInterface

public boolean isInterface()
Description copied from interface: JavaClassDescription
Is this class an interface?

Specified by:
isInterface in interface JavaClassDescription
Returns:
True if this is an interface.
See Also:
JavaClassDescription.isInterface()

isPublic

public boolean isPublic()
Description copied from interface: JavaClassDescription
Is this class public?

Specified by:
isPublic in interface JavaClassDescription
Returns:
True if this class is public.
See Also:
JavaClassDescription.isPublic()

addMethods

public void addMethods(String propertyName,
                       String className,
                       boolean createBind,
                       boolean createUnbind)
                throws SCRDescriptorException
Specified by:
addMethods in interface ModifiableJavaClassDescription
Throws:
SCRDescriptorException
See Also:
ModifiableJavaClassDescription.addMethods(java.lang.String, java.lang.String, boolean, boolean)

createMethod

protected void createMethod(org.objectweb.asm.ClassWriter cw,
                            String propertyName,
                            String typeName,
                            boolean bind)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getCompiledClass

public Class<?> getCompiledClass()


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