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

public class QDoxJavaClassDescription
extends java.lang.Object
implements JavaClassDescription, ModifiableJavaClassDescription

QDoxJavaClassDescription.java...


Field Summary
protected  java.lang.Class clazz
          The compiled class.
protected  com.thoughtworks.qdox.model.JavaClass javaClass
           
protected  JavaClassDescriptorManager manager
           
protected  com.thoughtworks.qdox.model.JavaSource source
           
 
Fields inherited from interface org.apache.felix.scrplugin.tags.JavaClassDescription
EMPTY_RESULT
 
Constructor Summary
QDoxJavaClassDescription(java.lang.Class clazz, com.thoughtworks.qdox.model.JavaSource source, JavaClassDescriptorManager m)
           
 
Method Summary
 void addMethods(java.lang.String propertyName, java.lang.String className, boolean createBind, boolean createUnbind)
           
protected  void createMethod(org.objectweb.asm.ClassWriter cw, java.lang.String propertyName, java.lang.String typeName, boolean bind)
           
 java.lang.Class getCompiledClass()
           
 JavaField getExternalFieldByName(java.lang.String name)
           
 JavaField getFieldByName(java.lang.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(java.lang.String name, java.lang.String[] parameters)
          Search for a method with the given signature.
 JavaMethod[] getMethods()
          Return all methods of this class
 java.lang.String getName()
          Get the name of the described class.
 JavaClassDescription getReferencedClass(java.lang.String referencedName)
          Search for the class.
 JavaClassDescription getSuperClass()
          Get the description for the parent class.
 JavaTag getTagByName(java.lang.String name)
          Get the java class tag with the name.
 JavaTag[] getTagsByName(java.lang.String name, boolean inherited)
          Get all class tags with this name.
 boolean isA(java.lang.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  java.lang.String searchImport(java.lang.String name)
           
 java.lang.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

source

protected final com.thoughtworks.qdox.model.JavaSource source

clazz

protected final java.lang.Class clazz
The compiled class.

Constructor Detail

QDoxJavaClassDescription

public QDoxJavaClassDescription(java.lang.Class clazz,
                                com.thoughtworks.qdox.model.JavaSource source,
                                JavaClassDescriptorManager m)
Method Detail

getSuperClass

public JavaClassDescription getSuperClass()
                                   throws org.apache.maven.plugin.MojoExecutionException
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:
org.apache.maven.plugin.MojoExecutionException
See Also:
JavaClassDescription.getSuperClass()

getTagByName

public JavaTag getTagByName(java.lang.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 java.lang.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(java.lang.String name,
                               boolean inherited)
                        throws org.apache.maven.plugin.MojoExecutionException
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:
org.apache.maven.plugin.MojoExecutionException
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(java.lang.String name)
                         throws org.apache.maven.plugin.MojoExecutionException
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:
org.apache.maven.plugin.MojoExecutionException
See Also:
JavaClassDescription.getFieldByName(java.lang.String)

getExternalFieldByName

public JavaField getExternalFieldByName(java.lang.String name)
                                 throws org.apache.maven.plugin.MojoExecutionException
Specified by:
getExternalFieldByName in interface JavaClassDescription
Throws:
org.apache.maven.plugin.MojoExecutionException
See Also:
JavaClassDescription.getExternalFieldByName(java.lang.String)

searchImport

protected java.lang.String searchImport(java.lang.String name)

getReferencedClass

public JavaClassDescription getReferencedClass(java.lang.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 org.apache.maven.plugin.MojoExecutionException
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:
org.apache.maven.plugin.MojoExecutionException
See Also:
JavaClassDescription.getImplementedInterfaces()

getMethodBySignature

public JavaMethod getMethodBySignature(java.lang.String name,
                                       java.lang.String[] parameters)
                                throws org.apache.maven.plugin.MojoExecutionException
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:
org.apache.maven.plugin.MojoExecutionException
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(java.lang.String type)
            throws org.apache.maven.plugin.MojoExecutionException
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:
org.apache.maven.plugin.MojoExecutionException
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(java.lang.String propertyName,
                       java.lang.String className,
                       boolean createBind,
                       boolean createUnbind)
                throws org.apache.maven.plugin.MojoExecutionException
Specified by:
addMethods in interface ModifiableJavaClassDescription
Throws:
org.apache.maven.plugin.MojoExecutionException
See Also:
ModifiableJavaClassDescription.addMethods(java.lang.String, java.lang.String, boolean, boolean)

createMethod

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

toString

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

getCompiledClass

public java.lang.Class getCompiledClass()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.