Skip to content

Commit

Permalink
unsetable implies derived
Browse files Browse the repository at this point in the history
  • Loading branch information
pvojtechovsky committed Jun 10, 2018
1 parent e7af301 commit 027e698
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/spoon/metamodel/MetamodelProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ private CtTypeReference<?> getMapValueType(CtTypeReference<?> valueType) {
*/
public boolean isDerived() {
if (derived == null) {
if (getOwner().getKind() == ConceptKind.LEAF && isUnsettable()) {
derived = Boolean.TRUE;
return derived;
}
// by default it's derived
derived = Boolean.FALSE;

Expand Down

0 comments on commit 027e698

Please sign in to comment.