Class JavaMethod
java.lang.Object
com.github.tadukoo.parsing.code.java.JavaMethod
Java Method represents a method in a Java class or interface, etc.
- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Java Method Builder is used to build a newJavaMethod
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final List<JavaAnnotation>
Theannotations
on the methodThe actual lines of code in the methodprivate final String
The name of the methodThe parameters used in the method - pairs of type, then nameprivate final String
The return type of the methodThe types that can be thrown by the methodprivate final Visibility
TheVisibility
of the method -
Constructor Summary
ModifierConstructorDescriptionprivate
JavaMethod
(List<JavaAnnotation> annotations, Visibility visibility, String returnType, String name, List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters, List<String> throwTypes, List<String> lines) Constructs a new Java Method with the given parameters -
Method Summary
Modifier and TypeMethodDescriptionstatic JavaMethod.JavaMethodBuilder
builder()
getLines()
getName()
toString()
-
Field Details
-
annotations
Theannotations
on the method -
visibility
TheVisibility
of the method -
returnType
The return type of the method -
name
The name of the method -
parameters
The parameters used in the method - pairs of type, then name -
throwTypes
The types that can be thrown by the method -
lines
The actual lines of code in the method
-
-
Constructor Details
-
JavaMethod
private JavaMethod(List<JavaAnnotation> annotations, Visibility visibility, String returnType, String name, List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters, List<String> throwTypes, List<String> lines) Constructs a new Java Method with the given parameters- Parameters:
annotations
- Theannotations
on the methodvisibility
- TheVisibility
of the methodreturnType
- The return type of the methodname
- The name of the methodparameters
- The parameters used in the method - pairs of type, then namethrowTypes
- The types that can be thrown by the methodlines
- The actual lines of code in the method
-
-
Method Details
-
builder
- Returns:
- A new
JavaMethod.JavaMethodBuilder
to use to build aJavaMethod
-
getAnnotations
- Returns:
- The
annotations
on the method
-
getVisibility
- Returns:
- The
Visibility
of the method
-
getReturnType
- Returns:
- The return type of the method
-
getName
- Returns:
- The name of the method
-
getParameters
- Returns:
- The parameters used in the method - pairs of type, then name
-
getThrowTypes
- Returns:
- The types that can be thrown by the method
-
getLines
- Returns:
- The actual lines of code in the method
-
toString
-