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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<JavaAnnotation>
Theannotations
on the classprivate final String
The name of the classThefields
on the classThe classes imported by the classprivate final List<JavaMethod>
Themethods
in the classprivate final String
The name of the package the class is inThe classes imported statically by the classprivate final String
The name of the class this one extends (may be null)private final Visibility
TheVisibility
of the class -
Constructor Summary
ModifierConstructorDescriptionprivate
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 -
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
Theannotations
on the class -
visibility
TheVisibility
of the class -
className
The name of the class -
superClassName
The name of the class this one extends (may be null) -
fields
Thefields
on the class -
methods
Themethods
in 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
- Theannotations
on the classvisibility
- TheVisibility
of the classclassName
- The name of the classsuperClassName
- The name of the class this one extends (may be null)fields
- Thefields
on the classmethods
- Themethods
in the class
-
-
Method Details
-
builder
- Returns:
- A new
JavaClass.JavaClassBuilder
to 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
annotations
on the class
-
getVisibility
- Returns:
- The
Visibility
of 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
fields
on the class
-
getMethods
- Returns:
- The
methods
in the class
-
toString
-