Skip to content

Commit

Permalink
Merge pull request #102 from moosetechnology/parametric
Browse files Browse the repository at this point in the history
regenerate Java metamodel
  • Loading branch information
LABSARI authored Feb 26, 2024
2 parents 2271009 + 2f59ade commit 956a25f
Show file tree
Hide file tree
Showing 79 changed files with 683 additions and 592 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ out/
/bin/
.project
.settings
**/.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ public Boolean getIsDead() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "numberOfChildren", derived = true)
public Number getNumberOfChildren() {
// TODO: this is a derived property, implement this method manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ public Boolean getIsDead() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "numberOfChildren", derived = true)
public Number getNumberOfChildren() {
// TODO: this is a derived property, implement this method manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ public Boolean getIsDead() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isStub")
public Boolean getIsStub() {
return isStub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public class Attribute extends NamedEntity implements TAccessible, TAttribute, T
private Boolean isFinal = false;

private Boolean isStub = false;

private Boolean isTransient = false;

private Boolean isVolatile = false;

private String name;
Expand Down Expand Up @@ -245,7 +245,7 @@ public void setIsFinal(Boolean isFinal) {
this.isFinal = isFinal;
}

@FameProperty(name = "getIsPackageVisibility", derived = true)
@FameProperty(name = "isPackageVisibility", derived = true)
public Boolean getIsPackageVisibility() {
return this.visibility.equals("package");
}
Expand All @@ -254,15 +254,21 @@ public Boolean getIsPackageVisibility() {
public Boolean getIsPrivate() {
return this.visibility.equals("private");
}

@FameProperty(name = "isProtected", derived = true)
public Boolean getIsProtected() {
return this.visibility.equals("protected");
}

@FameProperty(name = "isPublic", derived = true)
public Boolean getIsPublic() {
return this.visibility.equals("public");
return this.visibility.equals("public");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isStub")
Expand Down
40 changes: 20 additions & 20 deletions gen/org/moosetechnology/model/famix/famixjavaentities/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
@FameDescription("Class")
public class Class extends Type implements TCanBeAbstract, TCanBeClassSide, TCanBeFinal, TCanImplement, TClass, TClassMetrics, TEntityMetaLevelDependency, THasVisibility, TImportable, TInvocationsReceiver, TLCOMMetrics, TNamedEntity, TPackageable, TReferenceable, TSourceEntity, TType, TWithAttributes, TWithComments, TWithImports, TWithInheritances, TWithMethods {

private Boolean isInterface;
private Collection<TAttribute> attributes;
private Boolean isInterface;
private Collection<TAttribute> attributes;

private Collection<TComment> comments;

Expand Down Expand Up @@ -91,21 +91,6 @@ public class Class extends Type implements TCanBeAbstract, TCanBeClassSide, TCan



@FameProperty(name = "isIgnored", derived = true)
public Collection<Boolean> getIsIgnored() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isInterface")
public Boolean getIsInterface() {
return isInterface;
}

public void setIsInterface(Boolean isInterface) {
this.isInterface = isInterface;
}

@FameProperty(name = "attributes", opposite = "parentType", derived = true)
public Collection<TAttribute> getAttributes() {
if (attributes == null) {
Expand Down Expand Up @@ -426,11 +411,20 @@ public Boolean getIsFinal() {
return isFinal;
}

@FameProperty(name = "isInterface")
public Boolean getIsInterface() {
return isInterface;
}

public void setIsInterface(Boolean isInterface) {
this.isInterface = isInterface;
}

public void setIsFinal(Boolean isFinal) {
this.isFinal = isFinal;
}

@FameProperty(name = "isPackagegetIsPackageVisibility", derived = true)
@FameProperty(name = "isPackageVisibility", derived = true)
public Boolean getIsPackageVisibility() {
return this.visibility.equals("package");
}
Expand All @@ -444,12 +438,18 @@ public Boolean getIsPrivate() {
public Boolean getIsProtected() {
return this.visibility.equals("protected");
}

@FameProperty(name = "isPublic", derived = true)
public Boolean getIsPublic() {
return this.visibility.equals("public");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isStub")
public Boolean getIsStub() {
return isStub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
import java.util.*;
import org.moosetechnology.model.famix.famixreplication.Replica;
import org.moosetechnology.model.famix.famixtraits.TAssociation;
import org.moosetechnology.model.famix.famixtraits.TConcretisation;
import org.moosetechnology.model.famix.famixtraits.TParameterConcretisation;
import org.moosetechnology.model.famix.famixtraits.TConcretization;
import org.moosetechnology.model.famix.famixtraits.TParameterConcretization;
import org.moosetechnology.model.famix.famixtraits.TParametricEntity;
import org.moosetechnology.model.famix.famixtraits.TSourceAnchor;
import org.moosetechnology.model.famix.famixtraits.TSourceEntity;
import org.moosetechnology.model.famix.moosequery.TAssociationMetaLevelDependency;


@FamePackage("Famix-Java-Entities")
@FameDescription("Concretisation")
public class Concretisation extends Entity implements TAssociation, TAssociationMetaLevelDependency, TConcretisation, TSourceEntity {
@FameDescription("Concretization")
public class Concretization extends Entity implements TAssociation, TAssociationMetaLevelDependency, TConcretization, TSourceEntity {

private TParametricEntity concreteEntity;

Expand All @@ -30,15 +30,15 @@ public class Concretisation extends Entity implements TAssociation, TAssociation

private Number numberOfLinesOfCode;

private Collection<TParameterConcretisation> parameterConcretisations;
private Collection<TParameterConcretization> parameterConcretizations;

private TAssociation previous;

private TSourceAnchor sourceAnchor;



@FameProperty(name = "concreteEntity", opposite = "genericEntity")
@FameProperty(name = "concreteEntity", opposite = "genericization")
public TParametricEntity getConcreteEntity() {
return concreteEntity;
}
Expand All @@ -47,8 +47,8 @@ public void setConcreteEntity(TParametricEntity concreteEntity) {
if (this.concreteEntity == null ? concreteEntity != null : !this.concreteEntity.equals(concreteEntity)) {
TParametricEntity old_concreteEntity = this.concreteEntity;
this.concreteEntity = concreteEntity;
if (old_concreteEntity != null) old_concreteEntity.setGenericEntity(null);
if (concreteEntity != null) concreteEntity.setGenericEntity(this);
if (old_concreteEntity != null) old_concreteEntity.setGenericization(null);
if (concreteEntity != null) concreteEntity.setGenericization(this);
}
}

Expand All @@ -64,19 +64,19 @@ public Number getDuplicationRate() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "genericEntity", opposite = "concretisations")
@FameProperty(name = "genericEntity", opposite = "concretizations")
public TParametricEntity getGenericEntity() {
return genericEntity;
}

public void setGenericEntity(TParametricEntity genericEntity) {
if (this.genericEntity != null) {
if (this.genericEntity.equals(genericEntity)) return;
this.genericEntity.getConcretisations().remove(this);
this.genericEntity.getConcretizations().remove(this);
}
this.genericEntity = genericEntity;
if (genericEntity == null) return;
genericEntity.getConcretisations().add(this);
genericEntity.getConcretizations().add(this);
}

@FameProperty(name = "isStub")
Expand Down Expand Up @@ -117,54 +117,54 @@ public Number getNumberOfLinesOfCodeWithMoreThanOneCharacter() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "parameterConcretisations", opposite = "concretisations", derived = true)
public Collection<TParameterConcretisation> getParameterConcretisations() {
if (parameterConcretisations == null) {
parameterConcretisations = new MultivalueSet<TParameterConcretisation>() {
@FameProperty(name = "parameterConcretizations", opposite = "concretizations", derived = true)
public Collection<TParameterConcretization> getParameterConcretizations() {
if (parameterConcretizations == null) {
parameterConcretizations = new MultivalueSet<TParameterConcretization>() {
@Override
protected void clearOpposite(TParameterConcretisation e) {
e.getConcretisations().remove(Concretisation.this);
protected void clearOpposite(TParameterConcretization e) {
e.getConcretizations().remove(Concretization.this);
}
@Override
protected void setOpposite(TParameterConcretisation e) {
e.getConcretisations().add(Concretisation.this);
protected void setOpposite(TParameterConcretization e) {
e.getConcretizations().add(Concretization.this);
}
};
}
return parameterConcretisations;
return parameterConcretizations;
}

public void setParameterConcretisations(Collection<? extends TParameterConcretisation> parameterConcretisations) {
this.getParameterConcretisations().clear();
this.getParameterConcretisations().addAll(parameterConcretisations);
public void setParameterConcretizations(Collection<? extends TParameterConcretization> parameterConcretizations) {
this.getParameterConcretizations().clear();
this.getParameterConcretizations().addAll(parameterConcretizations);
}

public void addParameterConcretisations(TParameterConcretisation one) {
this.getParameterConcretisations().add(one);
public void addParameterConcretizations(TParameterConcretization one) {
this.getParameterConcretizations().add(one);
}

public void addParameterConcretisations(TParameterConcretisation one, TParameterConcretisation... many) {
this.getParameterConcretisations().add(one);
for (TParameterConcretisation each : many)
this.getParameterConcretisations().add(each);
public void addParameterConcretizations(TParameterConcretization one, TParameterConcretization... many) {
this.getParameterConcretizations().add(one);
for (TParameterConcretization each : many)
this.getParameterConcretizations().add(each);
}

public void addParameterConcretisations(Iterable<? extends TParameterConcretisation> many) {
for (TParameterConcretisation each : many)
this.getParameterConcretisations().add(each);
public void addParameterConcretizations(Iterable<? extends TParameterConcretization> many) {
for (TParameterConcretization each : many)
this.getParameterConcretizations().add(each);
}

public void addParameterConcretisations(TParameterConcretisation[] many) {
for (TParameterConcretisation each : many)
this.getParameterConcretisations().add(each);
public void addParameterConcretizations(TParameterConcretization[] many) {
for (TParameterConcretization each : many)
this.getParameterConcretizations().add(each);
}

public int numberOfParameterConcretisations() {
return getParameterConcretisations().size();
public int numberOfParameterConcretizations() {
return getParameterConcretizations().size();
}

public boolean hasParameterConcretisations() {
return !getParameterConcretisations().isEmpty();
public boolean hasParameterConcretizations() {
return !getParameterConcretizations().isEmpty();
}

@FameProperty(name = "previous", opposite = "next")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ public Boolean getIsPublic() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isStub")
public Boolean getIsStub() {
return isStub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ public Boolean getIsDead() {
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isRoot", derived = true)
public Boolean getIsRoot() {
// TODO: this is a derived property, implement this method manually.
throw new UnsupportedOperationException("Not yet implemented!");
}

@FameProperty(name = "isStub")
public Boolean getIsStub() {
return isStub;
Expand Down
Loading

0 comments on commit 956a25f

Please sign in to comment.