-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
71 additions
and
437 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 5 additions & 30 deletions
35
chapi-domain/src/main/kotlin/chapi/domain/core/CodeField.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,15 @@ | ||
package chapi.domain.core | ||
|
||
import chapi.domain.core.CodeCall | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class CodeField( | ||
var TypeType: String = "", | ||
var TypeValue: String = "", | ||
var TypeKey: String = "", | ||
var Annotations: Array<CodeAnnotation> = arrayOf(), | ||
var Modifiers: Array<String> = arrayOf(), | ||
var Annotations: List<CodeAnnotation> = listOf(), | ||
var Modifiers: List<String> = listOf(), | ||
// for TypeScript and JavaScript only, examples: `export default sample = createHello() ` | ||
var Calls: Array<CodeCall> = arrayOf() | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as CodeField | ||
|
||
if (TypeType != other.TypeType) return false | ||
if (TypeValue != other.TypeValue) return false | ||
if (TypeKey != other.TypeKey) return false | ||
if (!Annotations.contentEquals(other.Annotations)) return false | ||
if (!Modifiers.contentEquals(other.Modifiers)) return false | ||
if (!Calls.contentEquals(other.Calls)) return false | ||
|
||
return true | ||
} | ||
|
||
override fun hashCode(): Int { | ||
var result = TypeType.hashCode() | ||
result = 31 * result + TypeValue.hashCode() | ||
result = 31 * result + TypeKey.hashCode() | ||
result = 31 * result + Annotations.contentHashCode() | ||
result = 31 * result + Modifiers.contentHashCode() | ||
result = 31 * result + Calls.contentHashCode() | ||
return result | ||
} | ||
} | ||
var Calls: List<CodeCall> = listOf() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.