class Car { Wheel wheel_1; Axis axis = new Axis(new Wheel(wheel_1)); }
public void superAddBuildVariable(String value, Map<String, String> map) { super.addBuildVariable(value, map); }
public AxisDescriptor superGetDescriptor() { return super.getDescriptor(); }
/** * Previously we used to persist {@link Axis}, but now those are divided into subtypes. * So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass()!=Axis.class) return this; if (getName().equals("jdk")) return new JDKAxis(getValues()); if (getName().equals("label")) return new LabelAxis(getName(),getValues()); return new TextAxis(getName(),getValues()); }
public List<String> superGetValues() { return super.getValues(); }
/** * Verifies that Axis names are valid and unique. */ private void checkAxisNames(Iterable<Axis> newAxes) throws FormException { HashSet<String> axisNames = new HashSet<String>(); for (Axis a : newAxes) { FormValidation fv = a.getDescriptor().doCheckName(a.getName()); if (fv.kind!=Kind.OK) throw new FormException(Messages.MatrixProject_DuplicateAxisName(),fv,"axis.name"); if (axisNames.contains(a.getName())) throw new FormException(Messages.MatrixProject_DuplicateAxisName(),"axis.name"); axisNames.add(a.getName()); } }
public int superSize() { return super.size(); }
public String get(Axis a) { return get(a.getName()); }
/** * Verifies that Axis names are valid and unique. */ private void checkAxes(Iterable<Axis> newAxes) throws FormException { HashSet<String> axisNames = new HashSet<String>(); for (Axis a : newAxes) { final AxisDescriptor desc = a.getDescriptor(); FormValidation fv = desc.doCheckName(a.getName()); if (fv.kind!=Kind.OK) { final String msg = Messages.MatrixProject_InvalidAxisName(a.getName(), fv.getMessage()); throw new FormException(msg,fv,"axis.name"); } for (String value: a.getValues()) { fv = desc.checkValue(value); if (fv.kind!=Kind.OK) { final String msg = Messages.MatrixProject_InvalidAxisValue(value, fv.getMessage()); // This is done on wrong place, MatrixProject is not supposed // to know field names of arbitrary axis implementations throw new FormException(msg,fv,"axis.value"); } } if (axisNames.contains(a.getName())) throw new FormException(Messages.MatrixProject_DuplicateAxisName(),"axis.name"); axisNames.add(a.getName()); } }
public int superIndexOf(String value) { return super.indexOf(value); }
public boolean superIsSystem() { return super.isSystem(); }
/** * All {@link AxisDescriptor}s that contribute to the UI. */ public List<AxisDescriptor> getAxisDescriptors() { List<AxisDescriptor> r = new ArrayList<AxisDescriptor>(); for (AxisDescriptor d : Axis.all()) { if (d.isInstantiable()) r.add(d); } return r; } }
public int size() { return getValues().size(); }
/** * Verifies that Axis names are valid and unique. */ private void checkAxisNames(Iterable<Axis> newAxes) throws FormException { HashSet<String> axisNames = new HashSet<String>(); for (Axis a : newAxes) { FormValidation fv = a.getDescriptor().doCheckName(a.getName()); if (fv.kind!=Kind.OK) throw new FormException(Messages.MatrixProject_DuplicateAxisName(),fv,"axis.name"); if (axisNames.contains(a.getName())) throw new FormException(Messages.MatrixProject_DuplicateAxisName(),"axis.name"); axisNames.add(a.getName()); } }
/** * Computes the repeat count of n-th X-axis. */ public int repeatX(int n) { int w = 1; for( n--; n>=0; n-- ) w *= x.get(n).size(); return w; }
public String get(Axis a) { return get(a.getName()); }
/** * Previously we used to persist {@link Axis}, but now those are divided into subtypes. * So upon deserialization, resolve to the proper type. */ public Object readResolve() { if (getClass()!=Axis.class) return this; if (getName().equals("jdk")) return new JDKAxis(getValues()); if (getName().equals("label")) return new LabelAxis(getName(),getValues()); return new TextAxis(getName(),getValues()); }