Fixed annotations

This commit is contained in:
Anuken
2022-05-10 00:14:33 -04:00
parent 6efca04ea8
commit f7e74bdbfc
4 changed files with 6 additions and 6 deletions

View File

@ -163,7 +163,7 @@ public class EntityProcess extends BaseProcessor{
//SPECIAL CASE: components with EntityDefs don't get a base class! the generated class becomes the base class itself //SPECIAL CASE: components with EntityDefs don't get a base class! the generated class becomes the base class itself
if(component.annotation(Component.class).base()){ if(component.annotation(Component.class).base()){
Seq<Stype> deps = depends.copy().and(component); Seq<Stype> deps = depends.copy().add(component);
baseClassDeps.get(component, ObjectSet::new).addAll(deps); baseClassDeps.get(component, ObjectSet::new).addAll(deps);
//do not generate base classes when the component will generate one itself //do not generate base classes when the component will generate one itself
@ -822,7 +822,7 @@ public class EntityProcess extends BaseProcessor{
//create mock types of all components //create mock types of all components
for(Stype interf : allInterfaces){ for(Stype interf : allInterfaces){
//indirect interfaces to implement methods for //indirect interfaces to implement methods for
Seq<Stype> dependencies = interf.allInterfaces().and(interf); Seq<Stype> dependencies = interf.allInterfaces().add(interf);
Seq<Smethod> methods = dependencies.flatMap(Stype::methods); Seq<Smethod> methods = dependencies.flatMap(Stype::methods);
methods.sortComparing(Object::toString); methods.sortComparing(Object::toString);

View File

@ -25,7 +25,7 @@ public class Stype extends Selement<TypeElement>{
} }
public Seq<Stype> allInterfaces(){ public Seq<Stype> allInterfaces(){
return interfaces().flatMap(s -> s.allInterfaces().and(s)).distinct(); return interfaces().flatMap(s -> s.allInterfaces().add(s)).distinct();
} }
public Seq<Stype> superclasses(){ public Seq<Stype> superclasses(){
@ -33,7 +33,7 @@ public class Stype extends Selement<TypeElement>{
} }
public Seq<Stype> allSuperclasses(){ public Seq<Stype> allSuperclasses(){
return superclasses().flatMap(s -> s.allSuperclasses().and(s)).distinct(); return superclasses().flatMap(s -> s.allSuperclasses().add(s)).distinct();
} }
public Stype superclass(){ public Stype superclass(){

View File

@ -348,7 +348,7 @@ task updateBundles{
StringBuilder result = new StringBuilder() StringBuilder result = new StringBuilder()
//add everything ordered //add everything ordered
for(String key : base.orderedKeys().copy().and(extras.keys().toSeq())){ for(String key : base.orderedKeys().copy().add(extras.keys().toSeq())){
if(other.get(key) == null) continue if(other.get(key) == null) continue
result.append(processor.get(key, other.get(key))) result.append(processor.get(key, other.get(key)))

View File

@ -104,7 +104,7 @@ public class ScriptMainGenerator{
StringBuilder cdef = new StringBuilder(); StringBuilder cdef = new StringBuilder();
Seq<Class<?>> mapped = classes.select(c -> Modifier.isPublic(c.getModifiers()) && packages.contains(c.getCanonicalName()::startsWith)) Seq<Class<?>> mapped = classes.select(c -> Modifier.isPublic(c.getModifiers()) && packages.contains(c.getCanonicalName()::startsWith))
.and(Block.class); //special case .add(Block.class); //special case
for(Class<?> c : mapped){ for(Class<?> c : mapped){
cdef.append(" classes.put(\"").append(c.getSimpleName()).append("\", ").append(c.getCanonicalName()).append(".class);\n"); cdef.append(" classes.put(\"").append(c.getSimpleName()).append("\", ").append(c.getCanonicalName()).append(".class);\n");