private MetaConstructor findReifiedVersion(MetaConstructor formOf) { for (BuildMetaConstructor method : constructors) { if (method.getReifiedFormOf().equals(formOf)) { return method; } } return null; }
@Override public MetaConstructor[] getConstructors() { if (_constructorsCache != null) return _constructorsCache; if (constructors.isEmpty()) { // add an empty no-arg constructor BuildMetaConstructor buildMetaConstructor = new BuildMetaConstructor(this, new BlockStatement(), DefParameters.none()); buildMetaConstructor.setScope(Scope.Public); return _constructorsCache = new MetaConstructor[] {buildMetaConstructor}; } else { return _constructorsCache = constructors.toArray(new MetaConstructor[constructors.size()]); } }