Skip to content

Commit 24c9068

Browse files
committed
rename FlecsComponent to Component
1 parent 1a03297 commit 24c9068

12 files changed

Lines changed: 22 additions & 22 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ cd flecs-java
5454

5555
```java
5656
import com.github.elebras1.flecs.*;
57-
import com.github.elebras1.flecs.annotation.FlecsComponent;
57+
import com.github.elebras1.flecs.annotation.Component;
5858

5959
// Define components as records
60-
@FlecsComponent
60+
@Component
6161
record Position(float x, float y) {}
6262

63-
@FlecsComponent
63+
@Component
6464
record Velocity(float dx, float dy) {}
6565

6666
public class Example {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.elebras1.flecs.examples.components;
22

3-
import com.github.elebras1.flecs.annotation.FlecsComponent;
3+
import com.github.elebras1.flecs.annotation.Component;
44

5-
@FlecsComponent
5+
@Component
66
public record Health(int value) {
77
}
88

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.elebras1.flecs.examples.components;
22

3-
import com.github.elebras1.flecs.annotation.FlecsComponent;
3+
import com.github.elebras1.flecs.annotation.Component;
44

5-
@FlecsComponent
5+
@Component
66
public record Ideology(int color, byte factionDriftingSpeed, short stabilityIndex) {
77
}
88

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.github.elebras1.flecs.examples.components;
22

3-
import com.github.elebras1.flecs.annotation.FlecsComponent;
3+
import com.github.elebras1.flecs.annotation.Component;
44

5-
@FlecsComponent
5+
@Component
66
public record Label(String label) {
77
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.github.elebras1.flecs.examples.components;
22

3-
import com.github.elebras1.flecs.annotation.FlecsComponent;
3+
import com.github.elebras1.flecs.annotation.Component;
44

5-
@FlecsComponent
5+
@Component
66
public record Minister(String name, String imageFileName, float loyalty, int startDate, int deathDate) {
77
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.elebras1.flecs.examples.components;
22

3-
import com.github.elebras1.flecs.annotation.FlecsComponent;
3+
import com.github.elebras1.flecs.annotation.Component;
44

5-
@FlecsComponent
5+
@Component
66
public record Position(float x, float y) {
77
}
88

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.elebras1.flecs.examples.components;
22

3-
import com.github.elebras1.flecs.annotation.FlecsComponent;
3+
import com.github.elebras1.flecs.annotation.Component;
44

5-
@FlecsComponent
5+
@Component
66
public record Velocity(float dx, float dy) {
77
}
88

src/main/java/com/github/elebras1/flecs/annotation/FlecsComponent.java renamed to src/main/java/com/github/elebras1/flecs/annotation/Component.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
@Retention(RetentionPolicy.SOURCE)
99
@Target(ElementType.TYPE)
10-
public @interface FlecsComponent {
10+
public @interface Component {
1111
}
1212

src/main/java/com/github/elebras1/flecs/processor/ComponentCodeGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public JavaFile generateComponentClass(TypeElement recordElement, List<VariableE
3636
.build();
3737

3838
return JavaFile.builder(packageName, componentClass)
39-
.addFileComment("Generated by FlecsComponentProcessor")
39+
.addFileComment("Generated by ComponentProcessor")
4040
.indent(" ")
4141
.build();
4242
}

src/main/java/com/github/elebras1/flecs/processor/FlecsComponentProcessor.java renamed to src/main/java/com/github/elebras1/flecs/processor/ComponentProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import java.io.IOException;
1111
import java.util.*;
1212

13-
@SupportedAnnotationTypes("com.github.elebras1.flecs.annotation.FlecsComponent")
14-
public class FlecsComponentProcessor extends AbstractProcessor {
13+
@SupportedAnnotationTypes("com.github.elebras1.flecs.annotation.Component")
14+
public class ComponentProcessor extends AbstractProcessor {
1515

1616
private static final Set<String> SUPPORTED_TYPES = Set.of("byte", "short", "int", "long", "float", "double", "boolean", "java.lang.String");
1717
private Messager messager;

0 commit comments

Comments
 (0)