Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbashir committed Jun 16, 2024
1 parent a52973d commit 937cb55
Show file tree
Hide file tree
Showing 2 changed files with 336 additions and 332 deletions.
211 changes: 106 additions & 105 deletions example-java/src/main/java/ru/meta/MetaExampleJava.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ru.meta;

import static io.art.meta.model.MetaType.metaArray;
import static io.art.meta.model.MetaType.metaEnum;
import static io.art.meta.model.MetaType.metaType;

import io.art.core.property.LazyProperty;
Expand Down Expand Up @@ -32,12 +33,12 @@ public MetaRuPackage ruPackage() {
public static final class MetaRuPackage extends MetaPackage {
private final MetaExampleClass exampleClass = registerClass(new MetaExampleClass());

private final MetaServicePackage servicePackage = registerPackage(new MetaServicePackage());

private final MetaCommunicatorPackage communicatorPackage = registerPackage(new MetaCommunicatorPackage());

private final MetaModelPackage modelPackage = registerPackage(new MetaModelPackage());

private final MetaServicePackage servicePackage = registerPackage(new MetaServicePackage());

private MetaRuPackage() {
super("ru");
}
Expand All @@ -46,6 +47,10 @@ public MetaExampleClass exampleClass() {
return exampleClass;
}

public MetaServicePackage servicePackage() {
return servicePackage;
}

public MetaCommunicatorPackage communicatorPackage() {
return communicatorPackage;
}
Expand All @@ -54,10 +59,6 @@ public MetaModelPackage modelPackage() {
return modelPackage;
}

public MetaServicePackage servicePackage() {
return servicePackage;
}

public static final class MetaExampleClass extends MetaClass<ru.Example> {
private static final LazyProperty<MetaExampleClass> self = MetaClass.self(ru.Example.class);

Expand Down Expand Up @@ -122,6 +123,105 @@ public MetaParameter<java.lang.String[]> argumentsParameter() {
}
}

public static final class MetaServicePackage extends MetaPackage {
private final MetaMyServiceClass myServiceClass = registerClass(new MetaMyServiceClass());

private MetaServicePackage() {
super("service");
}

public MetaMyServiceClass myServiceClass() {
return myServiceClass;
}

public static final class MetaMyServiceClass extends MetaClass<ru.service.MyService> {
private static final LazyProperty<MetaMyServiceClass> self = MetaClass.self(ru.service.MyService.class);

private final MetaConstructorConstructor constructor = registerConstructor(new MetaConstructorConstructor(this));

private final MetaMyMethodMethod myMethodMethod = registerMethod(new MetaMyMethodMethod(this));

private final MetaGetModelMethod getModelMethod = registerMethod(new MetaGetModelMethod(this));

private MetaMyServiceClass() {
super(metaType(ru.service.MyService.class));
}

public static MetaMyServiceClass myService() {
return self.get();
}

public MetaConstructorConstructor constructor() {
return constructor;
}

public MetaMyMethodMethod myMethodMethod() {
return myMethodMethod;
}

public MetaGetModelMethod getModelMethod() {
return getModelMethod;
}

public final class MetaConstructorConstructor extends MetaConstructor<MetaMyServiceClass, ru.service.MyService> {
private MetaConstructorConstructor(MetaMyServiceClass owner) {
super(metaType(ru.service.MyService.class),owner);
}

@Override
public ru.service.MyService invoke(java.lang.Object[] arguments) throws Throwable {
return new ru.service.MyService();
}

@Override
public ru.service.MyService invoke() throws Throwable {
return new ru.service.MyService();
}
}

public final class MetaMyMethodMethod extends InstanceMetaMethod<MetaMyServiceClass, ru.service.MyService, ru.model.Model> {
private final MetaParameter<ru.model.Model> modelParameter = register(new MetaParameter<>(0, "model",metaType(ru.model.Model.class)));

private MetaMyMethodMethod(MetaMyServiceClass owner) {
super("myMethod",metaType(ru.model.Model.class),owner);
}

@Override
public java.lang.Object invoke(ru.service.MyService instance,
java.lang.Object[] arguments) throws Throwable {
return instance.myMethod((ru.model.Model)(arguments[0]));
}

@Override
public java.lang.Object invoke(ru.service.MyService instance, java.lang.Object argument)
throws Throwable {
return instance.myMethod((ru.model.Model)(argument));
}

public MetaParameter<ru.model.Model> modelParameter() {
return modelParameter;
}
}

public final class MetaGetModelMethod extends InstanceMetaMethod<MetaMyServiceClass, ru.service.MyService, ru.model.Model> {
private MetaGetModelMethod(MetaMyServiceClass owner) {
super("getModel",metaType(ru.model.Model.class),owner);
}

@Override
public java.lang.Object invoke(ru.service.MyService instance,
java.lang.Object[] arguments) throws Throwable {
return instance.getModel();
}

@Override
public java.lang.Object invoke(ru.service.MyService instance) throws Throwable {
return instance.getModel();
}
}
}
}

public static final class MetaCommunicatorPackage extends MetaPackage {
private final MetaMyCommunicatorClass myCommunicatorClass = registerClass(new MetaMyCommunicatorClass());

Expand Down Expand Up @@ -408,104 +508,5 @@ public java.lang.Object invoke(ru.model.Model.ModelBuilder instance) throws Thro
}
}
}

public static final class MetaServicePackage extends MetaPackage {
private final MetaMyServiceClass myServiceClass = registerClass(new MetaMyServiceClass());

private MetaServicePackage() {
super("service");
}

public MetaMyServiceClass myServiceClass() {
return myServiceClass;
}

public static final class MetaMyServiceClass extends MetaClass<ru.service.MyService> {
private static final LazyProperty<MetaMyServiceClass> self = MetaClass.self(ru.service.MyService.class);

private final MetaConstructorConstructor constructor = registerConstructor(new MetaConstructorConstructor(this));

private final MetaMyMethodMethod myMethodMethod = registerMethod(new MetaMyMethodMethod(this));

private final MetaGetModelMethod getModelMethod = registerMethod(new MetaGetModelMethod(this));

private MetaMyServiceClass() {
super(metaType(ru.service.MyService.class));
}

public static MetaMyServiceClass myService() {
return self.get();
}

public MetaConstructorConstructor constructor() {
return constructor;
}

public MetaMyMethodMethod myMethodMethod() {
return myMethodMethod;
}

public MetaGetModelMethod getModelMethod() {
return getModelMethod;
}

public final class MetaConstructorConstructor extends MetaConstructor<MetaMyServiceClass, ru.service.MyService> {
private MetaConstructorConstructor(MetaMyServiceClass owner) {
super(metaType(ru.service.MyService.class),owner);
}

@Override
public ru.service.MyService invoke(java.lang.Object[] arguments) throws Throwable {
return new ru.service.MyService();
}

@Override
public ru.service.MyService invoke() throws Throwable {
return new ru.service.MyService();
}
}

public final class MetaMyMethodMethod extends InstanceMetaMethod<MetaMyServiceClass, ru.service.MyService, ru.model.Model> {
private final MetaParameter<ru.model.Model> modelParameter = register(new MetaParameter<>(0, "model",metaType(ru.model.Model.class)));

private MetaMyMethodMethod(MetaMyServiceClass owner) {
super("myMethod",metaType(ru.model.Model.class),owner);
}

@Override
public java.lang.Object invoke(ru.service.MyService instance,
java.lang.Object[] arguments) throws Throwable {
return instance.myMethod((ru.model.Model)(arguments[0]));
}

@Override
public java.lang.Object invoke(ru.service.MyService instance, java.lang.Object argument)
throws Throwable {
return instance.myMethod((ru.model.Model)(argument));
}

public MetaParameter<ru.model.Model> modelParameter() {
return modelParameter;
}
}

public final class MetaGetModelMethod extends InstanceMetaMethod<MetaMyServiceClass, ru.service.MyService, ru.model.Model> {
private MetaGetModelMethod(MetaMyServiceClass owner) {
super("getModel",metaType(ru.model.Model.class),owner);
}

@Override
public java.lang.Object invoke(ru.service.MyService instance,
java.lang.Object[] arguments) throws Throwable {
return instance.getModel();
}

@Override
public java.lang.Object invoke(ru.service.MyService instance) throws Throwable {
return instance.getModel();
}
}
}
}
}
}
Loading

0 comments on commit 937cb55

Please sign in to comment.