public abstract class JavaType extends Object implements Comparable<JavaType>, Serializable
| Modifier and Type | Field and Description |
|---|---|
static JavaType |
ANNOTATION
The "annotation" java type.
|
static JavaType |
CLASS
The "class" java type.
|
static JavaType |
ENUM
The "enum" java type.
|
static JavaType |
INTERFACE
The "interface" java type.
|
| Modifier | Constructor and Description |
|---|---|
protected |
JavaType(String programmingLanguageKeyword)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(JavaType o) |
abstract DependencyType |
createAnnotationDependencyType(String annotationName,
String annotationPackageName)
Creates the annotation
DependencyType instance associated to the current java type
following the passed parameters. |
abstract DependencyType |
createDependencyType(String dependencyName,
String dependencyPackageName,
boolean isAbstract,
ImportDependenciesCollection importDependencies,
Set<GenericDependency> parentExtensionsDependencies,
Set<GenericDependency> parentImplementationsDependencies,
Set<GenericDependency> annotationDependencies)
Creates the
DependencyType instance associated to the current java type following
passed parameters. |
abstract DependencyType |
createParentDependencyType(JavaParentType parentType,
String parentName,
String parentPackageName)
Creates the parent
DependencyType instance associated to the current java type
following the JavaParentType and passed parameters. |
boolean |
equals(Object obj) |
abstract boolean |
extractNativeMethods(String javaSourceFileContent)
Parses and extracts the java source file content to know if it contains links to native code
through native methods.
|
abstract Set<String> |
extractParentExtensions(String extendsString)
Parses and extracts the
Set of parent dependency names of type
JavaParentType.EXTENSION from the passed String. |
abstract Set<String> |
extractParentImplementations(String implementsString)
Parses and extracts the
Set of parent dependency names of type
JavaParentType.IMPLEMENTATION from the passed String. |
protected Set<String> |
extractParents(String parentsString)
|
static Collection<JavaType> |
getJavaTypeCollection()
Gets the
Collection of all JavaType. |
String |
getLanguageKeyword()
Gets the value of
languageKeyword. |
int |
hashCode() |
String |
toString() |
static JavaType |
valueOfIgnoringCase(String javaTypeKeyword)
Gets the
JavaType instance associated to the passed java type language keyword. |
public static final JavaType ANNOTATION
public static final JavaType CLASS
public static final JavaType ENUM
public static final JavaType INTERFACE
protected JavaType(String programmingLanguageKeyword)
programmingLanguageKeyword - The java type language keyword, mustn't be null.public static Collection<JavaType> getJavaTypeCollection()
Collection of all JavaType.Collection of all JavaType available.public static JavaType valueOfIgnoringCase(String javaTypeKeyword)
JavaType instance associated to the passed java type language keyword. Throw
an IllegalArgumentException if the java type name isn't recognized.javaTypeKeyword - the java type language keyword to get the instance from, mustn't be
null nor empty.JavaType instance associated to the passed java type language keyword if
available.public int compareTo(JavaType o)
compareTo in interface Comparable<JavaType>public abstract DependencyType createAnnotationDependencyType(String annotationName, String annotationPackageName) throws PlantUMLDependencyException
DependencyType instance associated to the current java type
following the passed parameters.annotationName - the dependency annotation name, such as "String", mustn't be null.annotationPackageName - the dependency annotation package name, such as "java.lang", mustn't be
null.DependencyType instance which is an annotation of the current java type,
following the passed parameters.PlantUMLDependencyException - if the requested java annotation type is incompatible with the current java type.public abstract DependencyType createDependencyType(String dependencyName, String dependencyPackageName, boolean isAbstract, ImportDependenciesCollection importDependencies, Set<GenericDependency> parentExtensionsDependencies, Set<GenericDependency> parentImplementationsDependencies, Set<GenericDependency> annotationDependencies)
DependencyType instance associated to the current java type following
passed parameters.dependencyName - the dependency name, such as "String", mustn't be null.dependencyPackageName - the dependency package name, such as "java.lang", mustn't be null.isAbstract - the boolean telling if the java dependency is abstract or not.importDependencies - the ImportDependenciesCollection containing all import dependencies which
are needed by the current dependency type to work, mustn't be null.parentExtensionsDependencies - the Set of all GenericDependency which are extended, mustn't be
null.parentImplementationsDependencies - the Set of all GenericDependency which are implemented, mustn't be
null.annotationDependencies - the Set of all GenericDependency which are used as annotation,
mustn't be null.DependencyType instance, following the current java type and the passed
parameters.public abstract DependencyType createParentDependencyType(JavaParentType parentType, String parentName, String parentPackageName) throws PlantUMLDependencyException
DependencyType instance associated to the current java type
following the JavaParentType and passed parameters.parentType - the JavaParentType instance, mustn't be null.parentName - the dependency parent name, such as "String", mustn't be null.parentPackageName - the dependency parent package name, such as "java.lang", mustn't be
null.DependencyType instance which is the parent of the current java type,
following the java java type and the passed parameters.PlantUMLDependencyException - if the requested java parent type is incompatible with the current java type.public abstract boolean extractNativeMethods(String javaSourceFileContent)
javaSourceFileContent - the java source file content to analyze as a String, mustn't be
null.true if the dependency contains native methods, false
otherwise.public abstract Set<String> extractParentExtensions(String extendsString) throws PlantUMLDependencyException
Set of parent dependency names of type
JavaParentType.EXTENSION from the passed String.extendsString - the String which describes the dependencies which are extended by the
current java type.
For instance it can be :
Comparable, Cloneable
Number
Set of parent dependency names parsed from the String.PlantUMLDependencyException - if the requested parent dependency names are incompatible with the current java
type.public abstract Set<String> extractParentImplementations(String implementsString) throws PlantUMLDependencyException
Set of parent dependency names of type
JavaParentType.IMPLEMENTATION from the passed String.implementsString - the String which describes the dependencies which are implemented by the
current java type.
For instance it can be :
Serializable, Cloneable
Number
Set of parent dependency names parsed from the String.PlantUMLDependencyException - if the requested parent dependency names are incompatible with the current java
type.public String getLanguageKeyword()
languageKeyword.languageKeyword.Copyright © 2014 Sourceforge. All rights reserved.