package com.marcozanon.macaco;
-import com.marcozanon.macaco.text.MText;
import java.io.PrintWriter;
import java.io.StringWriter;
/* */
+ @Override
protected MObject clone() {
throw new UnsupportedOperationException("Please provide manually by yourself.");
}
+ @Override
public String toString() {
throw new UnsupportedOperationException("Please use appropriate methods (if any).");
}
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Locale;
import java.util.TimeZone;
this.setTimeZone(timeZone);
}
+ @Override
public MDateConverter clone() {
return new MDateConverter(this.getDateFormats(), this.getLocale(), this.getTimeZone());
}
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Locale;
this.setLocale(locale);
}
+ @Override
public MLocalDateConverter clone() {
return new MLocalDateConverter(this.getDateFormats(), this.getLocale());
}
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Locale;
this.setLocale(locale);
}
+ @Override
public MLocalDateTimeConverter clone() {
return new MLocalDateTimeConverter(this.getDatetimeFormats(), this.getLocale());
}
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.ParsePosition;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Locale;
this.setLocale(locale);
}
+ @Override
public MNumberConverter clone() {
return new MNumberConverter(this.getNumberFormats(), this.getLocale());
}
}
}
+ @Override
protected void finalize() {
try {
this.close();
}
}
+ @Override
protected void finalize() {
this.closeConnections();
}
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
-import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
}
}
+ @Override
protected void finalize() {
try {
this.close();
this.parseString(x);
}
+ @Override
public MJsonArray clone() {
MJsonArray tmpMJsonArray = null;
try {
/* Formatter. */
+ @Override
public String getJsonValue() {
StringBuilder s = new StringBuilder("");
s.append("[");
this.parseString(x);
}
+ @Override
public MJsonBoolean clone() {
MJsonBoolean tmpMJsonBoolean = null;
try {
/* Formatter. */
+ @Override
public String getJsonValue() {
return this.getValue().toString();
}
this.parseString(x);
}
+ @Override
public MJsonNull clone() {
MJsonNull tmpMJsonNull = null;
try {
/* Formatter. */
+ @Override
public String getJsonValue() {
return "null";
}
this.parseString(x);
}
+ @Override
public MJsonNumber clone() {
MJsonNumber tmpMJsonNumber = null;
try {
/* Formatter. */
+ @Override
public String getJsonValue() {
return this.getValue().toString();
}
this.parseString(x);
}
+ @Override
public MJsonObject clone() {
MJsonObject tmpMJsonObject = null;
try {
/* Formatter. */
+ @Override
public String getJsonValue() {
StringBuilder s = new StringBuilder("");
s.append("{");
this.parseString(x);
}
+ @Override
public MJsonString clone() {
MJsonString tmpMJsonString = null;
try {
/* Formatter. */
+ @Override
public String getJsonValue() {
return "\"" + MJsonString.getEscapedString(this.getValue(), this.getExtendedEscapeMode()) + "\"";
}
/* */
+ @Override
public abstract MJsonValue clone();
/* Helpers. */
this.logDatabaseField = logDatabaseField;
}
+ @Override
public void close() throws MLoggingException {
}
/* Output. */
+ @Override
public void appendMessage(String message) throws MLoggingException {
this.appendMessage(message, 0);
}
+ @Override
public void appendMessage(String message, int indentation) throws MLoggingException {
if (null == message) {
throw new IllegalArgumentException("Invalid 'message': null.");
}
}
+ @Override
protected void finalize() {
try {
this.close();
package com.marcozanon.macaco.logging;
import com.marcozanon.macaco.MConstants;
-import com.marcozanon.macaco.MInformation;
import com.marcozanon.macaco.text.MText;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
}
}
+ @Override
public void close() throws MLoggingException {
try {
this.getBuffer().close();
/* Output. */
+ @Override
public void appendMessage(String message) throws MLoggingException {
this.appendMessage(message, 0);
}
+ @Override
public void appendMessage(String message, int indentation) throws MLoggingException {
if (null == message) {
throw new IllegalArgumentException("Invalid 'message': null.");
public abstract void close() throws MLoggingException;
+ @Override
protected void finalize() {
try {
this.close();
package com.marcozanon.macaco.text;
import com.marcozanon.macaco.MConstants;
-import com.marcozanon.macaco.MInformation;
import com.marcozanon.macaco.MObject;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
XMLReader reader = parser.getXMLReader();
reader.setEntityResolver(new EntityResolver() {
+ @Override
public InputSource resolveEntity(String publicId, String systemId) {
return new InputSource(new BufferedInputStream(this.getClass().getClassLoader().getResourceAsStream("dtd/xhtml1-transitional-macaco-edit.dtd")));
}
});
reader.setContentHandler(new DefaultHandler() {
+ @Override
public void startElement(String namespaceUri, String strippedName, String tagName, Attributes attributes) throws SAXException {
if ("script".equalsIgnoreCase(tagName)) {
throw new SAXException(String.format("Tag not allowed: %s.", tagName));
});
reader.setErrorHandler(new ErrorHandler() {
+ @Override
public void error(SAXParseException exception) throws SAXException {
throw new SAXException(exception);
}
+ @Override
public void fatalError(SAXParseException exception) throws SAXException {
throw new SAXException(exception);
}
+ @Override
public void warning(SAXParseException exception) throws SAXException {
throw new SAXException(exception);
}
package com.marcozanon.macaco.text;
import com.marcozanon.macaco.MConstants;
-import com.marcozanon.macaco.MInformation;
import com.marcozanon.macaco.MObject;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
this.parseFile(file);
}
+ @Override
public MTranslator clone() {
return new MTranslator(this.getBasicLocale(), this.getMessages());
}