Class ModifyableJavaType
- java.lang.Object
-
- com.devonfw.cobigen.javaplugin.merger.libextension.ModifyableJavaType
-
- All Implemented Interfaces:
com.thoughtworks.qdox.model.JavaAnnotatedElement,com.thoughtworks.qdox.model.JavaClass,com.thoughtworks.qdox.model.JavaGenericDeclaration,com.thoughtworks.qdox.model.JavaModel,com.thoughtworks.qdox.model.JavaType,Serializable
- Direct Known Subclasses:
ModifyableJavaTypeVariable
public class ModifyableJavaType extends Object implements com.thoughtworks.qdox.model.JavaClass, com.thoughtworks.qdox.model.JavaType, Serializable
The default implementation forJavaType- Since:
- 2.0
- Author:
- Robert Scholte
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)List<com.thoughtworks.qdox.model.JavaAnnotation>getAnnotations()List<com.thoughtworks.qdox.model.BeanProperty>getBeanProperties()List<com.thoughtworks.qdox.model.BeanProperty>getBeanProperties(boolean superclasses)com.thoughtworks.qdox.model.BeanPropertygetBeanProperty(String propertyName)com.thoughtworks.qdox.model.BeanPropertygetBeanProperty(String propertyName, boolean superclasses)StringgetBinaryName()StringgetCanonicalName()StringgetCodeBlock()StringgetComment()com.thoughtworks.qdox.model.JavaClassgetComponentType()com.thoughtworks.qdox.model.JavaConstructorgetConstructor(List<com.thoughtworks.qdox.model.JavaType> parameterTypes)com.thoughtworks.qdox.model.JavaConstructorgetConstructor(List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean varArg)List<com.thoughtworks.qdox.model.JavaConstructor>getConstructors()com.thoughtworks.qdox.model.JavaClassgetDeclaringClass()List<com.thoughtworks.qdox.model.JavaClass>getDerivedClasses()intgetDimensions()com.thoughtworks.qdox.model.JavaFieldgetEnumConstantByName(String name)List<com.thoughtworks.qdox.model.JavaField>getEnumConstants()com.thoughtworks.qdox.model.JavaFieldgetFieldByName(String name)List<com.thoughtworks.qdox.model.JavaField>getFields()StringgetFullyQualifiedName()StringgetGenericCanonicalName()StringgetGenericFullyQualifiedName()StringgetGenericValue()protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
StringgetGenericValue(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeVariableList)List<com.thoughtworks.qdox.model.JavaType>getImplements()List<com.thoughtworks.qdox.model.JavaInitializer>getInitializers()List<com.thoughtworks.qdox.model.JavaClass>getInterfaces()com.thoughtworks.qdox.library.ClassLibrarygetJavaClassLibrary()intgetLineNumber()com.thoughtworks.qdox.model.JavaMethodgetMethod(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean varArgs)com.thoughtworks.qdox.model.JavaMethodgetMethodBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes)com.thoughtworks.qdox.model.JavaMethodgetMethodBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses)com.thoughtworks.qdox.model.JavaMethodgetMethodBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses, boolean varArg)List<com.thoughtworks.qdox.model.JavaMethod>getMethods()List<com.thoughtworks.qdox.model.JavaMethod>getMethods(boolean superclasses)List<com.thoughtworks.qdox.model.JavaMethod>getMethodsBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses)List<com.thoughtworks.qdox.model.JavaMethod>getMethodsBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses, boolean varArg)List<String>getModifiers()StringgetName()StringgetNamedParameter(String tagName, String parameterName)com.thoughtworks.qdox.model.JavaClassgetNestedClassByName(String name)List<com.thoughtworks.qdox.model.JavaClass>getNestedClasses()com.thoughtworks.qdox.model.JavaPackagegetPackage()StringgetPackageName()com.thoughtworks.qdox.model.JavaSourcegetParentSource()protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
StringgetResolvedFullyQualifiedName(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
StringgetResolvedGenericFullyQualifiedName(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
StringgetResolvedGenericValue(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
StringgetResolvedValue(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)StringgetSimpleName()com.thoughtworks.qdox.model.JavaSourcegetSource()com.thoughtworks.qdox.model.JavaTypegetSuperClass()com.thoughtworks.qdox.model.JavaClassgetSuperJavaClass()com.thoughtworks.qdox.model.DocletTaggetTagByName(String name)List<com.thoughtworks.qdox.model.DocletTag>getTags()List<com.thoughtworks.qdox.model.DocletTag>getTagsByName(String name)List<com.thoughtworks.qdox.model.DocletTag>getTagsByName(String name, boolean superclasses)<D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
List<com.thoughtworks.qdox.model.JavaTypeVariable<D>>getTypeParameters()StringgetValue()inthashCode()booleanisA(com.thoughtworks.qdox.model.JavaClass javaClass)booleanisA(com.thoughtworks.qdox.model.JavaType type)booleanisA(String fullClassName)booleanisAbstract()booleanisAnnotation()booleanisArray()booleanisEnum()booleanisFinal()booleanisInner()booleanisInterface()booleanisPrimitive()booleanisPrivate()booleanisProtected()booleanisPublic()protected booleanisResolved()booleanisStatic()booleanisVoid()protected static com.thoughtworks.qdox.model.JavaTyperesolve(com.thoughtworks.qdox.model.JavaType base, com.thoughtworks.qdox.model.JavaClass declaringClass, com.thoughtworks.qdox.model.JavaClass callingClass)Consider the following exampleprotected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration>
com.thoughtworks.qdox.model.JavaTypeVariable<D>resolve(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)StringtoGenericString()Returns getGenericValue() extended with the array informationStringtoString()Equivalent ofClass.toString().
-
-
-
Method Detail
-
getBinaryName
public String getBinaryName()
- Specified by:
getBinaryNamein interfacecom.thoughtworks.qdox.model.JavaType
-
getSimpleName
public String getSimpleName()
- Specified by:
getSimpleNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
getFullyQualifiedName
public String getFullyQualifiedName()
- Specified by:
getFullyQualifiedNamein interfacecom.thoughtworks.qdox.model.JavaType
-
getComponentType
public com.thoughtworks.qdox.model.JavaClass getComponentType()
- Specified by:
getComponentTypein interfacecom.thoughtworks.qdox.model.JavaClass
-
getValue
public String getValue()
- Specified by:
getValuein interfacecom.thoughtworks.qdox.model.JavaType
-
getGenericValue
public String getGenericValue()
- Specified by:
getGenericValuein interfacecom.thoughtworks.qdox.model.JavaType
-
getGenericValue
protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> String getGenericValue(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeVariableList)
-
getResolvedValue
protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> String getResolvedValue(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)
-
resolve
protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> com.thoughtworks.qdox.model.JavaTypeVariable<D> resolve(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)
-
isResolved
protected boolean isResolved()
-
isArray
public boolean isArray()
- Specified by:
isArrayin interfacecom.thoughtworks.qdox.model.JavaClass
-
getDimensions
public int getDimensions()
- Specified by:
getDimensionsin interfacecom.thoughtworks.qdox.model.JavaClass
-
toString
public String toString()
Equivalent ofClass.toString(). Converts the object to a string.- Specified by:
toStringin interfacecom.thoughtworks.qdox.model.JavaClass- Overrides:
toStringin classObject- Returns:
- a string representation of this type.
- See Also:
Class.toString()
-
toGenericString
public String toGenericString()
Returns getGenericValue() extended with the array informationObject > java.lang.Object Object[] > java.lang.Object[] List<Object> > java.lang.List<java.lang.Object> Outer.Inner > Outer$Inner Outer.Inner<Object>[][] > Outer$Inner<java.lang.Object>[][]
- Specified by:
toGenericStringin interfacecom.thoughtworks.qdox.model.JavaType- Returns:
- a generic string representation of this type.
-
isA
public boolean isA(com.thoughtworks.qdox.model.JavaType type)
- Parameters:
type- the type to match with- Returns:
trueif this type if of type, otherwisefalse- Since:
- 1.3
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein interfacecom.thoughtworks.qdox.model.JavaClass
-
isVoid
public boolean isVoid()
- Specified by:
isVoidin interfacecom.thoughtworks.qdox.model.JavaClass
-
resolve
protected static com.thoughtworks.qdox.model.JavaType resolve(com.thoughtworks.qdox.model.JavaType base, com.thoughtworks.qdox.model.JavaClass declaringClass, com.thoughtworks.qdox.model.JavaClass callingClass)Consider the following examplepublic abstract class AbstractClass<T> { private T value; public AbstractClass(T value) { this.value = value; } public T getValue() { return value; } } public class ConcreteClass extends AbstractClass<String> { public ConcreteClass(String s) { super(s); } }We want to know the resolved returnType when calling
ConcreteClass.getValue(). The expected type is String.thiswould be TdeclaringClasswould be AbstractClass, since that's where T is usedcallingClasswould be ConcreteClass
- Parameters:
base- the basedeclaringClass- the declaring classcallingClass- the calling class- Returns:
- the resolved type
-
getGenericFullyQualifiedName
public String getGenericFullyQualifiedName()
- Specified by:
getGenericFullyQualifiedNamein interfacecom.thoughtworks.qdox.model.JavaType
-
getGenericCanonicalName
public String getGenericCanonicalName()
- Specified by:
getGenericCanonicalNamein interfacecom.thoughtworks.qdox.model.JavaType
-
getResolvedGenericValue
protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> String getResolvedGenericValue(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)
-
getResolvedGenericFullyQualifiedName
protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> String getResolvedGenericFullyQualifiedName(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)
-
getResolvedFullyQualifiedName
protected static <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> String getResolvedFullyQualifiedName(com.thoughtworks.qdox.model.JavaType base, List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> typeParameters)
-
getSource
public com.thoughtworks.qdox.model.JavaSource getSource()
- Specified by:
getSourcein interfacecom.thoughtworks.qdox.model.JavaClass
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfacecom.thoughtworks.qdox.model.JavaModel
-
isInterface
public boolean isInterface()
- Specified by:
isInterfacein interfacecom.thoughtworks.qdox.model.JavaClass
-
getAnnotations
public List<com.thoughtworks.qdox.model.JavaAnnotation> getAnnotations()
- Specified by:
getAnnotationsin interfacecom.thoughtworks.qdox.model.JavaAnnotatedElement
-
isEnum
public boolean isEnum()
- Specified by:
isEnumin interfacecom.thoughtworks.qdox.model.JavaClass
-
getComment
public String getComment()
- Specified by:
getCommentin interfacecom.thoughtworks.qdox.model.JavaAnnotatedElement
-
getTags
public List<com.thoughtworks.qdox.model.DocletTag> getTags()
- Specified by:
getTagsin interfacecom.thoughtworks.qdox.model.JavaAnnotatedElement
-
isAnnotation
public boolean isAnnotation()
- Specified by:
isAnnotationin interfacecom.thoughtworks.qdox.model.JavaClass
-
getTagsByName
public List<com.thoughtworks.qdox.model.DocletTag> getTagsByName(String name)
- Specified by:
getTagsByNamein interfacecom.thoughtworks.qdox.model.JavaAnnotatedElement
-
getTagByName
public com.thoughtworks.qdox.model.DocletTag getTagByName(String name)
- Specified by:
getTagByNamein interfacecom.thoughtworks.qdox.model.JavaAnnotatedElement
-
getSuperClass
public com.thoughtworks.qdox.model.JavaType getSuperClass()
- Specified by:
getSuperClassin interfacecom.thoughtworks.qdox.model.JavaClass
-
getSuperJavaClass
public com.thoughtworks.qdox.model.JavaClass getSuperJavaClass()
- Specified by:
getSuperJavaClassin interfacecom.thoughtworks.qdox.model.JavaClass
-
getImplements
public List<com.thoughtworks.qdox.model.JavaType> getImplements()
- Specified by:
getImplementsin interfacecom.thoughtworks.qdox.model.JavaClass
-
getInterfaces
public List<com.thoughtworks.qdox.model.JavaClass> getInterfaces()
- Specified by:
getInterfacesin interfacecom.thoughtworks.qdox.model.JavaClass
-
getNamedParameter
public String getNamedParameter(String tagName, String parameterName)
- Specified by:
getNamedParameterin interfacecom.thoughtworks.qdox.model.JavaAnnotatedElement
-
getCodeBlock
public String getCodeBlock()
- Specified by:
getCodeBlockin interfacecom.thoughtworks.qdox.model.JavaClass- Specified by:
getCodeBlockin interfacecom.thoughtworks.qdox.model.JavaModel
-
getTypeParameters
public <D extends com.thoughtworks.qdox.model.JavaGenericDeclaration> List<com.thoughtworks.qdox.model.JavaTypeVariable<D>> getTypeParameters()
- Specified by:
getTypeParametersin interfacecom.thoughtworks.qdox.model.JavaGenericDeclaration
-
getParentSource
public com.thoughtworks.qdox.model.JavaSource getParentSource()
- Specified by:
getParentSourcein interfacecom.thoughtworks.qdox.model.JavaClass
-
getPackage
public com.thoughtworks.qdox.model.JavaPackage getPackage()
- Specified by:
getPackagein interfacecom.thoughtworks.qdox.model.JavaClass
-
getPackageName
public String getPackageName()
- Specified by:
getPackageNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
isInner
public boolean isInner()
- Specified by:
isInnerin interfacecom.thoughtworks.qdox.model.JavaClass
-
getInitializers
public List<com.thoughtworks.qdox.model.JavaInitializer> getInitializers()
- Specified by:
getInitializersin interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethods
public List<com.thoughtworks.qdox.model.JavaMethod> getMethods()
- Specified by:
getMethodsin interfacecom.thoughtworks.qdox.model.JavaClass
-
getConstructors
public List<com.thoughtworks.qdox.model.JavaConstructor> getConstructors()
- Specified by:
getConstructorsin interfacecom.thoughtworks.qdox.model.JavaClass
-
getConstructor
public com.thoughtworks.qdox.model.JavaConstructor getConstructor(List<com.thoughtworks.qdox.model.JavaType> parameterTypes)
- Specified by:
getConstructorin interfacecom.thoughtworks.qdox.model.JavaClass
-
getConstructor
public com.thoughtworks.qdox.model.JavaConstructor getConstructor(List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean varArg)
- Specified by:
getConstructorin interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethods
public List<com.thoughtworks.qdox.model.JavaMethod> getMethods(boolean superclasses)
- Specified by:
getMethodsin interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethodBySignature
public com.thoughtworks.qdox.model.JavaMethod getMethodBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes)
- Specified by:
getMethodBySignaturein interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethod
public com.thoughtworks.qdox.model.JavaMethod getMethod(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean varArgs)
- Specified by:
getMethodin interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethodBySignature
public com.thoughtworks.qdox.model.JavaMethod getMethodBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses)
- Specified by:
getMethodBySignaturein interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethodBySignature
public com.thoughtworks.qdox.model.JavaMethod getMethodBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses, boolean varArg)
- Specified by:
getMethodBySignaturein interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethodsBySignature
public List<com.thoughtworks.qdox.model.JavaMethod> getMethodsBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses)
- Specified by:
getMethodsBySignaturein interfacecom.thoughtworks.qdox.model.JavaClass
-
getMethodsBySignature
public List<com.thoughtworks.qdox.model.JavaMethod> getMethodsBySignature(String name, List<com.thoughtworks.qdox.model.JavaType> parameterTypes, boolean superclasses, boolean varArg)
- Specified by:
getMethodsBySignaturein interfacecom.thoughtworks.qdox.model.JavaClass
-
getFields
public List<com.thoughtworks.qdox.model.JavaField> getFields()
- Specified by:
getFieldsin interfacecom.thoughtworks.qdox.model.JavaClass
-
getFieldByName
public com.thoughtworks.qdox.model.JavaField getFieldByName(String name)
- Specified by:
getFieldByNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
getEnumConstants
public List<com.thoughtworks.qdox.model.JavaField> getEnumConstants()
- Specified by:
getEnumConstantsin interfacecom.thoughtworks.qdox.model.JavaClass
-
getEnumConstantByName
public com.thoughtworks.qdox.model.JavaField getEnumConstantByName(String name)
- Specified by:
getEnumConstantByNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
getNestedClasses
public List<com.thoughtworks.qdox.model.JavaClass> getNestedClasses()
- Specified by:
getNestedClassesin interfacecom.thoughtworks.qdox.model.JavaClass
-
getNestedClassByName
public com.thoughtworks.qdox.model.JavaClass getNestedClassByName(String name)
- Specified by:
getNestedClassByNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
isA
public boolean isA(String fullClassName)
- Specified by:
isAin interfacecom.thoughtworks.qdox.model.JavaClass
-
isA
public boolean isA(com.thoughtworks.qdox.model.JavaClass javaClass)
- Specified by:
isAin interfacecom.thoughtworks.qdox.model.JavaClass
-
getBeanProperties
public List<com.thoughtworks.qdox.model.BeanProperty> getBeanProperties()
- Specified by:
getBeanPropertiesin interfacecom.thoughtworks.qdox.model.JavaClass
-
getBeanProperties
public List<com.thoughtworks.qdox.model.BeanProperty> getBeanProperties(boolean superclasses)
- Specified by:
getBeanPropertiesin interfacecom.thoughtworks.qdox.model.JavaClass
-
getBeanProperty
public com.thoughtworks.qdox.model.BeanProperty getBeanProperty(String propertyName)
- Specified by:
getBeanPropertyin interfacecom.thoughtworks.qdox.model.JavaClass
-
getBeanProperty
public com.thoughtworks.qdox.model.BeanProperty getBeanProperty(String propertyName, boolean superclasses)
- Specified by:
getBeanPropertyin interfacecom.thoughtworks.qdox.model.JavaClass
-
getDerivedClasses
public List<com.thoughtworks.qdox.model.JavaClass> getDerivedClasses()
- Specified by:
getDerivedClassesin interfacecom.thoughtworks.qdox.model.JavaClass
-
getTagsByName
public List<com.thoughtworks.qdox.model.DocletTag> getTagsByName(String name, boolean superclasses)
- Specified by:
getTagsByNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
getJavaClassLibrary
public com.thoughtworks.qdox.library.ClassLibrary getJavaClassLibrary()
- Specified by:
getJavaClassLibraryin interfacecom.thoughtworks.qdox.model.JavaClass
-
getName
public String getName()
- Specified by:
getNamein interfacecom.thoughtworks.qdox.model.JavaClass
-
getCanonicalName
public String getCanonicalName()
- Specified by:
getCanonicalNamein interfacecom.thoughtworks.qdox.model.JavaType
-
getModifiers
public List<String> getModifiers()
- Specified by:
getModifiersin interfacecom.thoughtworks.qdox.model.JavaClass
-
isPublic
public boolean isPublic()
- Specified by:
isPublicin interfacecom.thoughtworks.qdox.model.JavaClass
-
isProtected
public boolean isProtected()
- Specified by:
isProtectedin interfacecom.thoughtworks.qdox.model.JavaClass
-
isPrivate
public boolean isPrivate()
- Specified by:
isPrivatein interfacecom.thoughtworks.qdox.model.JavaClass
-
isFinal
public boolean isFinal()
- Specified by:
isFinalin interfacecom.thoughtworks.qdox.model.JavaClass
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin interfacecom.thoughtworks.qdox.model.JavaClass
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfacecom.thoughtworks.qdox.model.JavaClass
-
getDeclaringClass
public com.thoughtworks.qdox.model.JavaClass getDeclaringClass()
- Specified by:
getDeclaringClassin interfacecom.thoughtworks.qdox.model.JavaClass
-
-