org.apache.felix.scrplugin.tags.cl
Class ClassLoaderJavaClassDescription

java.lang.Object
  extended by org.apache.felix.scrplugin.tags.cl.ClassLoaderJavaClassDescription
All Implemented Interfaces:
JavaClassDescription

public class ClassLoaderJavaClassDescription
extends java.lang.Object
implements JavaClassDescription

ClassLoaderJavaClassDescription.java...


Field Summary
protected  java.lang.Class clazz
           
protected  Component component
           
protected static JavaTag[] EMPTY_TAGS
           
protected  JavaClassDescriptorManager manager
           
 
Fields inherited from interface org.apache.felix.scrplugin.tags.JavaClassDescription
EMPTY_RESULT
 
Constructor Summary
ClassLoaderJavaClassDescription(java.lang.Class c, Component comp, JavaClassDescriptorManager m)
           
 
Method Summary
 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  boolean testClass(java.lang.Class c, java.lang.String type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_TAGS

protected static final JavaTag[] EMPTY_TAGS

clazz

protected final java.lang.Class clazz

manager

protected final JavaClassDescriptorManager manager

component

protected final Component component
Constructor Detail

ClassLoaderJavaClassDescription

public ClassLoaderJavaClassDescription(java.lang.Class c,
                                       Component comp,
                                       JavaClassDescriptorManager m)
Method Detail

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)

getReferencedClass

public JavaClassDescription getReferencedClass(java.lang.String referencedName)
                                        throws org.apache.maven.plugin.MojoExecutionException
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
Throws:
org.apache.maven.plugin.MojoExecutionException
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()

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()

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)

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)

isA

public boolean isA(java.lang.String type)
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.
See Also:
JavaClassDescription.isA(java.lang.String)

testClass

protected boolean testClass(java.lang.Class c,
                            java.lang.String type)

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()

toString

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


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