1.0.5 • Published 4 years ago

@langion/langion v1.0.5

Weekly downloads
91
License
MIT
Repository
github
Last release
4 years ago

Langion

Langion is a JSON format definition. Sometimes you need to integrate with a system that is written in other language. For example your server is written in Java and your client is written in TypeScript. So when someone will change something on server, TypeScript will not be able no highlight errors because server is written in Java. But the information about types is close, just written in different language. What you need is to extract types from another language and generate types in you languages. The Langion format defines common information to describe types in different language. Using this format you can generate any code you want.

How to run on Java

In order to generate Langion you need to add langion-maven-plugin to your pom.xml

<plugin>
    <groupId>com.github.langion</groupId>
    <artifactId>langion-maven-plugin</artifactId>
    <version>1.5</version>
    <executions>
        <execution>
            <configuration>
                <outFileName>{path to output file}</outFileName>
                <srcBaseJavaFolders>{absolute path to src folder}</srcBaseJavaFolders>
                <pattern>
                    <pattern>{Pattern of canonical paths}</pattern>
                </pattern>
            </configuration>
            <id>java-to-json</id>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Form

Kind

Enum - All the entities that has Langion

KeyValue
AnnotationAnnotation
EnumEnum
FieldField
GenericGeneric
InterfaceInterface
LangionLangion
MethodMethod
ClassClass
ModifierModifier
PackagePackage
TypeType
ValueValue
VariableVariable
WildcardWildcard

Modifiers

Enum - Modifiers that applied to fields

KeyValue
PrivatePrivate
ProtectedProtected
PublicPublic

Entity

KeyTypeComment
Canonicalstring
Commentstring
KindKind
Namestring
Pathstring

AnnotationEntity

Extends: Entity

KeyTypeComment
ItemsMap<string, ValueEntity>

ArgumentEntity

Extends: Entity

KeyTypeComment
Positionnumber
TypeTypeEntity
AnnotationsMap<string, AnnotationEntity>

ClassEntity

Extends: Entity

KeyTypeComment
ExtendsTypeEntity
ModifiersModifierEntity
AnnotationsMap<string, ValueEntity>
FieldsMap<string, FieldEntity>
ImplementsMap<string, TypeEntity>
MethodsMap<string, Array<MethodEntity>>
ConstructorsArray<MethodEntity>
VariablesMap<string, VariableEntity>

EnumEntity

Extends: Entity

KeyTypeComment
ExtendsTypeEntity
ModifiersModifierEntity
AnnotationsMap<string, ValueEntity>
ImplementsMap<string, TypeEntity>
VariablesMap<string, VariableEntity>
ItemsMap<string, string>

FieldEntity

Extends: Entity

KeyTypeComment
ModifiersModifierEntity
TypeTypeEntity
AnnotationsMap<string, AnnotationEntity>

GenericEntity

Extends: Entity

KeyTypeComment
IsParameterboolean
Positionnumber
TypeTypeEntity
VariableVariableEntity
WildcardWildcardEntity

InterfaceEntity

Extends: Entity

KeyTypeComment
ModifiersModifierEntity
AnnotationsMap<string, AnnotationEntity>
ExtendsMap<string, TypeEntity>
MethodsMap<string, Array<MethodEntity>>
VariablesMap<string, VariableEntity>

Langion

Extends: Entity

KeyTypeComment
ModulesMap<string, ModuleEntity>
Versionstring

InterfaceEntity

Extends: Entity

KeyTypeComment
ModifierModifierEntity
ReturnsTypeEntity
AnnotationsMap<string, AnnotationEntity>
ArgumentsMap<string, ArgumentEntity>
VariablesMap<string, VariableEntity>

ModifierEntity

Extends: Entity

KeyTypeComment
ItemsMap<Modifiers, Modifiers>

ModuleEntity

Extends: Entity

KeyTypeComment
ExportsMap<string, Entity>
ModulesMap<string, ModuleEntity>

TypeEntity

Extends: Entity

KeyTypeComment
IsArrayboolean
IsParameterboolean
GenericsMap<string, GenericEntity>

ValueEntity

Extends: Entity

KeyTypeComment
Contentany
TypeTypeEntity

VariableEntity

Extends: Entity

KeyTypeComment
Positionnumber

WildcardEntity

Extends: Entity

KeyTypeComment
LowerMap<string, GenericEntity>
UpperMap<string, GenericEntity>
1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago