Package org.jfuncmachine.compiler.model
Class ClassDef
java.lang.Object
org.jfuncmachine.compiler.model.SourceElement
org.jfuncmachine.compiler.model.ClassDef
- Direct Known Subclasses:
EnumDef
A definition for a class, containing methods, fields, and the names of interfaces that are implemented
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intAny access flags for the class (can be a sum of values from the Access class)final ClassField[]The fields defined for this classfinal String[]The interfaces this class implementsfinal MethodDef[]The methods defined for this classfinal StringThe name of the classfinal StringThe package name of the class (may be null)final StringThe class name of the superclassfinal StringThe package name of the superclassFields inherited from class org.jfuncmachine.compiler.model.SourceElement
filename, lineNumber -
Constructor Summary
ConstructorsConstructorDescriptionClassDef(String packageName, String name, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces) Create a class definitionClassDef(String packageName, String name, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces, String filename, int lineNumber) Create a class definitionClassDef(String packageName, String name, String superPackageName, String superName, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces) Create a class definitionClassDef(String packageName, String name, String superPackageName, String superName, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces, String filename, int lineNumber) Create a class definitionClassDef(String packageName, String name, ClassDef superClass, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces) Create a class definitionClassDef(String packageName, String name, ClassDef superClass, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces, String filename, int lineNumber) Create a class definition -
Method Summary
Modifier and TypeMethodDescriptionReturns the fully-qualified name of the class - package (if not null) + '.' + class nameMethods inherited from class org.jfuncmachine.compiler.model.SourceElement
generateException
-
Field Details
-
packageName
The package name of the class (may be null) -
name
The name of the class -
superPackageName
The package name of the superclass -
superName
The class name of the superclass -
access
public final int accessAny access flags for the class (can be a sum of values from the Access class) -
methodDefs
The methods defined for this class -
fields
The fields defined for this class -
interfaces
The interfaces this class implements
-
-
Constructor Details
-
ClassDef
public ClassDef(String packageName, String name, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces) Create a class definition- Parameters:
packageName- The package name of the class (may be null)name- The name of the classaccess- Any access flags for the class (can be a sum of values from the Access class)methodDefs- The methods defined for this classfields- The fields defined for this classinterfaces- The interfaces this class implements
-
ClassDef
public ClassDef(String packageName, String name, ClassDef superClass, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces) Create a class definition- Parameters:
packageName- The package name of the class (may be null)name- The name of the classsuperClass- The ClassDef of the superclassaccess- Any access flags for the class (can be a sum of values from the Access class)methodDefs- The methods defined for this classfields- The fields defined for this classinterfaces- The interfaces this class implements
-
ClassDef
public ClassDef(String packageName, String name, String superPackageName, String superName, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces) Create a class definition- Parameters:
packageName- The package name of the class (may be null)name- The name of the classsuperPackageName- The package name of the superclasssuperName- The name of the superclassaccess- Any access flags for the class (can be a sum of values from the Access class)methodDefs- The methods defined for this classfields- The fields defined for this classinterfaces- The interfaces this class implements
-
ClassDef
public ClassDef(String packageName, String name, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces, String filename, int lineNumber) Create a class definition- Parameters:
packageName- The package name of the class (may be null)name- The name of the classaccess- Any access flags for the class (can be a sum of values from the Access class)methodDefs- The methods defined for this classfields- The fields defined for this classinterfaces- The interfaces this class implementsfilename- The source code filename this class was generated fromlineNumber- The starting line number in the source code where this class is defined
-
ClassDef
public ClassDef(String packageName, String name, ClassDef superClass, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces, String filename, int lineNumber) Create a class definition- Parameters:
packageName- The package name of the class (may be null)name- The name of the classsuperClass- The ClassDef of the superclassaccess- Any access flags for the class (can be a sum of values from the Access class)methodDefs- The methods defined for this classfields- The fields defined for this classinterfaces- The interfaces this class implementsfilename- The source code filename this class was generated fromlineNumber- The starting line number in the source code where this class is defined
-
ClassDef
public ClassDef(String packageName, String name, String superPackageName, String superName, int access, MethodDef[] methodDefs, ClassField[] fields, String[] interfaces, String filename, int lineNumber) Create a class definition- Parameters:
packageName- The package name of the class (may be null)name- The name of the classsuperPackageName- The package name of the superclasssuperName- The name of the superclassaccess- Any access flags for the class (can be a sum of values from the Access class)methodDefs- The methods defined for this classfields- The fields defined for this classinterfaces- The interfaces this class implementsfilename- The source code filename this class was generated fromlineNumber- The starting line number in the source code where this class is defined
-
-
Method Details
-
getFullClassName
Returns the fully-qualified name of the class - package (if not null) + '.' + class name- Returns:
- The fully-qualified name of this class
-