Class JavaClass
java.lang.Object
com.github.tadukoo.parsing.code.java.JavaClass
Java Class is used to represent a class in Java.
- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<JavaAnnotation>Theannotationson the classprivate final StringThe name of the classThefieldson the classThe classes imported by the classprivate final List<JavaMethod>Themethodsin the classprivate final StringThe name of the package the class is inThe classes imported statically by the classprivate final StringThe name of the class this one extends (may be null)private final VisibilityTheVisibilityof the class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateJavaClass(String packageName, List<String> imports, List<String> staticImports, List<JavaAnnotation> annotations, Visibility visibility, String className, String superClassName, List<JavaField> fields, List<JavaMethod> methods) Constructs a new Java Class with the given parameters -
Method Summary
-
Field Details
-
packageName
The name of the package the class is in -
imports
The classes imported by the class -
staticImports
The classes imported statically by the class -
annotations
Theannotationson the class -
visibility
TheVisibilityof the class -
className
The name of the class -
superClassName
The name of the class this one extends (may be null) -
fields
Thefieldson the class -
methods
Themethodsin the class
-
-
Constructor Details
-
JavaClass
private JavaClass(String packageName, List<String> imports, List<String> staticImports, List<JavaAnnotation> annotations, Visibility visibility, String className, String superClassName, List<JavaField> fields, List<JavaMethod> methods) Constructs a new Java Class with the given parameters- Parameters:
packageName- The name of the package the class is inimports- The classes imported by the classstaticImports- The classes imported statically by the classannotations- Theannotationson the classvisibility- TheVisibilityof the classclassName- The name of the classsuperClassName- The name of the class this one extends (may be null)fields- Thefieldson the classmethods- Themethodsin the class
-
-
Method Details
-
builder
- Returns:
- A new
JavaClass.JavaClassBuilderto use to build aJavaClass
-
getPackageName
- Returns:
- The name of the package the class is in
-
getImports
- Returns:
- The classes imported by the class
-
getStaticImports
- Returns:
- The classes imported statically by the class
-
getAnnotations
- Returns:
- The
annotationson the class
-
getVisibility
- Returns:
- The
Visibilityof the class
-
getClassName
- Returns:
- The name of the class
-
getSuperClassName
- Returns:
- The name of the class this one extends (may be null)
-
getFields
- Returns:
- The
fieldson the class
-
getMethods
- Returns:
- The
methodsin the class
-
toString
-