Skip to content

Commit

Permalink
Updated isConst argument
Browse files Browse the repository at this point in the history
  • Loading branch information
anchouls committed Dec 20, 2023
1 parent 2e3e3dd commit 7bd4c84
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ data class TestVariable(
visibility: Visibility?,
isFinal: Boolean,
isInPrimaryConstructor: Boolean,
isStatic: Boolean,
isConst: Boolean
isStatic: Boolean
) : this(
name = name,
javaType = javaType,
Expand All @@ -57,7 +56,7 @@ data class TestVariable(
mutability = if (isFinal) VariableMutability.VAL else VariableMutability.VAR,
isInPrimaryConstructor = isInPrimaryConstructor,
isStatic = isStatic,
isConst = isConst
isConst = isStatic && isFinal
)

constructor(name: String, javaType: String) : this(name, javaType, null, null, null, null, false, false, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ static void beforeAll() {
Visibility.PUBLIC,
true,
false,
false,
true
),
new TestVariable(
Expand All @@ -40,7 +39,6 @@ static void beforeAll() {
Visibility.PRIVATE,
true,
false,
false,
true
),
new TestVariable(
Expand All @@ -50,8 +48,7 @@ static void beforeAll() {
Visibility.PUBLIC,
false,
false,
true,
false
true
),
new TestVariable(
"privateStaticVar",
Expand All @@ -60,8 +57,7 @@ static void beforeAll() {
Visibility.PRIVATE,
false,
false,
true,
false
true
),
new TestVariable(
"publicVar",
Expand All @@ -70,7 +66,6 @@ static void beforeAll() {
Visibility.PUBLIC,
false,
false,
false,
false
),
new TestVariable(
Expand All @@ -80,7 +75,6 @@ static void beforeAll() {
Visibility.PRIVATE,
false,
false,
false,
false
),
new TestVariable(
Expand All @@ -90,7 +84,6 @@ static void beforeAll() {
Visibility.PUBLIC,
false,
false,
false,
false
),
new TestVariable(
Expand All @@ -100,7 +93,6 @@ static void beforeAll() {
Visibility.PUBLIC,
false,
true,
false,
false
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ val javaClassTestClass = TestClass(
javaType = "int",
value = "1",
visibility = Visibility.PUBLIC,
mutability = VariableMutability.VAL,
isFinal = true,
isInPrimaryConstructor = false,
isConst = true
isStatic = true
),
TestVariable(
name = "PRIVATE_CONSTANT",
javaType = "int",
value = "2",
visibility = Visibility.PRIVATE,
mutability = VariableMutability.VAL,
isFinal = true,
isInPrimaryConstructor = false,
isConst = true
isStatic = true
),
TestVariable(
name = "publicStaticVar",
javaType = "int",
value = "3",
visibility = Visibility.PUBLIC,
mutability = VariableMutability.VAR,
isFinal = false,
isInPrimaryConstructor = false,
isStatic = true
),
Expand All @@ -42,7 +42,7 @@ val javaClassTestClass = TestClass(
javaType = "int",
value = "4",
visibility = Visibility.PRIVATE,
mutability = VariableMutability.VAR,
isFinal = false,
isInPrimaryConstructor = false,
isStatic = true
),
Expand All @@ -51,30 +51,36 @@ val javaClassTestClass = TestClass(
javaType = "String",
value = "publicVar",
visibility = Visibility.PUBLIC,
mutability = VariableMutability.VAR,
isFinal = false,
isInPrimaryConstructor = false,
isStatic = false
),
TestVariable(
name = "privateVar",
javaType = "String",
value = "privateVar",
visibility = Visibility.PRIVATE,
mutability = VariableMutability.VAR,
isFinal = false,
isInPrimaryConstructor = false,
isStatic = false
),
TestVariable(
name = "customClass",
javaType = "CustomJavaClass",
value = null,
visibility = Visibility.PUBLIC,
mutability = VariableMutability.VAR,
isFinal = false,
isInPrimaryConstructor = false,
isStatic = false
),
TestVariable(
name = "primaryConstructorVar",
javaType = "String",
value = null,
visibility = Visibility.PUBLIC,
mutability = VariableMutability.VAR,
isFinal = false,
isInPrimaryConstructor = true,
isStatic = false
),
),
customMethods = listOf(
Expand Down

0 comments on commit 7bd4c84

Please sign in to comment.