/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }
/** * Resolves instances being deserialized to the predefined constants. */ protected Object readResolve() throws InvalidObjectException { if (this.getClass() != Attribute.class) { throw new InvalidObjectException("subclass didn't correctly implement readResolve"); } Attribute instance = (Attribute) instanceMap.get(getName()); if (instance != null) { return instance; } else { throw new InvalidObjectException("unknown attribute name"); } }
/** * Resolves instances being deserialized to the predefined constants. */ protected Object readResolve() throws InvalidObjectException { if (this.getClass() != Attribute.class) { throw new InvalidObjectException("subclass didn't correctly implement readResolve"); } Attribute instance = (Attribute) instanceMap.get(getName()); if (instance != null) { return instance; } else { throw new InvalidObjectException("unknown attribute name"); } }
/** * Resolves instances being deserialized to the predefined constants. */ protected Object readResolve() throws InvalidObjectException { if (this.getClass() != TextAttribute.class) { throw new InvalidObjectException("subclass didn't correctly implement readResolve"); } TextAttribute instance = (TextAttribute) instanceMap.get(getName()); if (instance != null) { return instance; } else { throw new InvalidObjectException("unknown attribute name"); } }
protected Object readResolve() throws InvalidObjectException { return instances.get(getName()); }
/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }
/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }
/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }
/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }
/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }
/** * Returns the name of the class followed by a "(", the name of the * attribute, and a ")". * * @return the string representing this instance. */ @Override public String toString() { return getClass().getName() + '(' + getName() + ')'; } }