Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbashir committed Jul 7, 2024
1 parent 937cb55 commit 756e022
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1,257 deletions.
73 changes: 0 additions & 73 deletions example-java/src/main/java/ru/meta/MetaExampleJava.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.art.core.property.LazyProperty;
import io.art.meta.model.InstanceMetaMethod;
import io.art.meta.model.MetaClass;
import io.art.meta.model.MetaConstructor;
import io.art.meta.model.MetaField;
import io.art.meta.model.MetaLibrary;
import io.art.meta.model.MetaMethod;
Expand Down Expand Up @@ -62,8 +61,6 @@ public MetaModelPackage modelPackage() {
public static final class MetaExampleClass extends MetaClass<ru.Example> {
private static final LazyProperty<MetaExampleClass> self = MetaClass.self(ru.Example.class);

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

private final MetaMainMethod mainMethod = registerMethod(new MetaMainMethod(this));

private MetaExampleClass() {
Expand All @@ -74,30 +71,10 @@ public static MetaExampleClass example() {
return self.get();
}

public MetaConstructorConstructor constructor() {
return constructor;
}

public MetaMainMethod mainMethod() {
return mainMethod;
}

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

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

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

public final class MetaMainMethod extends StaticMetaMethod<MetaExampleClass, Void> {
private final MetaParameter<java.lang.String[]> argumentsParameter = register(new MetaParameter<>(0, "arguments",metaArray(java.lang.String[].class, java.lang.String[]::new, metaType(java.lang.String.class))));

Expand Down Expand Up @@ -137,8 +114,6 @@ public MetaMyServiceClass 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));
Expand All @@ -151,10 +126,6 @@ public static MetaMyServiceClass myService() {
return self.get();
}

public MetaConstructorConstructor constructor() {
return constructor;
}

public MetaMyMethodMethod myMethodMethod() {
return myMethodMethod;
}
Expand All @@ -163,22 +134,6 @@ 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)));

Expand Down Expand Up @@ -342,8 +297,6 @@ public MetaModelClass modelClass() {
public static final class MetaModelClass extends MetaClass<ru.model.Model> {
private static final LazyProperty<MetaModelClass> self = MetaClass.self(ru.model.Model.class);

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

private final MetaField<MetaModelClass, java.lang.String> valueField = registerField(new MetaField<>("value",metaType(java.lang.String.class),false,this));

private final MetaToBuilderMethod toBuilderMethod = registerMethod(new MetaToBuilderMethod(this));
Expand All @@ -360,10 +313,6 @@ public static MetaModelClass model() {
return self.get();
}

public MetaConstructorConstructor constructor() {
return constructor;
}

public MetaField<MetaModelClass, java.lang.String> valueField() {
return valueField;
}
Expand All @@ -380,28 +329,6 @@ public MetaModelBuilderClass modelBuilderClass() {
return modelBuilderClass;
}

public final class MetaConstructorConstructor extends MetaConstructor<MetaModelClass, ru.model.Model> {
private final MetaParameter<java.lang.String> valueParameter = register(new MetaParameter<>(0, "value",metaType(java.lang.String.class)));

private MetaConstructorConstructor(MetaModelClass owner) {
super(metaType(ru.model.Model.class),owner);
}

@Override
public ru.model.Model invoke(java.lang.Object[] arguments) throws Throwable {
return new ru.model.Model((java.lang.String)(arguments[0]));
}

@Override
public ru.model.Model invoke(java.lang.Object argument) throws Throwable {
return new ru.model.Model((java.lang.String)(argument));
}

public MetaParameter<java.lang.String> valueParameter() {
return valueParameter;
}
}

public final class MetaToBuilderMethod extends InstanceMetaMethod<MetaModelClass, ru.model.Model, ru.model.Model.ModelBuilder> {
private MetaToBuilderMethod(MetaModelClass owner) {
super("toBuilder",metaType(ru.model.Model.ModelBuilder.class),owner);
Expand Down
3 changes: 1 addition & 2 deletions example-kotlin/src/main/kotlin/ru/Example.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ import io.art.rsocket.kotlin.rsocket
import io.art.transport.kotlin.transport
import io.art.yaml.kotlin.yaml
import ru.communicator.MyCommunicator
import ru.meta.MetaExampleKotlin
import ru.service.MyService

data class Request(val success: String)

fun main() = activator {
meta(::MetaExampleKotlin)
//meta(::MetaExampleKotlin)
configurator()
logging()
json()
Expand Down
Loading

0 comments on commit 756e022

Please sign in to comment.