Skip to content

Commit 527f6cd

Browse files
removing deprecateds
1 parent d16d2ec commit 527f6cd

File tree

8 files changed

+12
-129
lines changed

8 files changed

+12
-129
lines changed

SerialX-core/src/main/java/org/ugp/serialx/GenericScope.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -378,21 +378,6 @@ public boolean contains(Object value)
378378
return values().contains(value);
379379
}
380380

381-
/**
382-
* @deprecated USE {@link GenericScope#contains(Object)} instead!
383-
*
384-
* @param value | Object the value.
385-
*
386-
* @return True if independent value was found in this scope.
387-
*
388-
* @since 1.2.0
389-
*/
390-
@Deprecated
391-
public boolean containsIndependentValue(ValT value)
392-
{
393-
return values().contains(value);
394-
}
395-
396381
/**
397382
* @param valueIndex | Index of independent value. Also can be negative, in this case u will get elements from back!
398383
* {@link IndexOutOfBoundsException} will be thrown if index is too big!

SerialX-core/src/main/java/org/ugp/serialx/Serializer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.net.URI;
2626
import java.net.URL;
2727
import java.net.URLConnection;
28+
import java.util.AbstractMap;
2829
import java.util.ArrayList;
2930
import java.util.Arrays;
3031
import java.util.Collection;
@@ -198,13 +199,16 @@ public <T> T into(T obj, String... fieldNamesToUse) throws IntrospectionExceptio
198199
}
199200

200201
/**
202+
* @deprecated (1.3.9) DO NOT USE THIS, USE VARIATION OF {@link AbstractMap.SimpleEntry} OR {@link VariableConverter#NewVariable(String, Object)} FROM <code>serialx-juss module</code> INSTEAD!
203+
*
201204
* @param name | Name of variable.
202205
* @param value | Value of variable.
203206
*
204207
* @return Classic variable expression in general form like [name] = [value].
205208
*
206209
* @since 1.1.5
207210
*/
211+
@Deprecated
208212
public <T> String Var(String name, T value)
209213
{
210214
return Code(name + " = " + getParsers().toString(value, 0, 0, this, getProtocols(), false) + ";");

SerialX-core/src/main/java/org/ugp/serialx/Utils.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -932,34 +932,4 @@ public static void post(Serializer serializer, HttpURLConnection conn) throws IO
932932
conn.setDoOutput(true);
933933
conn.getOutputStream().write(postDataBytes);
934934
}
935-
936-
/**
937-
* This is a "dummy" class that {@link Serializer} uses internally as an OOP programmatic interpretation of null. In otherwise this is wrapper object for null.
938-
* Note: You should not be able to come in contact with this during serialization and loading, if you did then you most likely encountered and bug and you should report it!
939-
*
940-
* @author PETO
941-
*
942-
* @since 1.2.2
943-
*
944-
* @deprecated (in 1.3.8) NO LONGER NEEDED, DO NOT USE THIS! You were never supposed to...
945-
*/
946-
public static final class NULL //TODO: REMOVE IN NEXT V!!!!
947-
{
948-
public static Object toOopNull(Object obj)
949-
{
950-
return obj == null ? new NULL() : obj;
951-
}
952-
953-
@Override
954-
public boolean equals(Object obj)
955-
{
956-
return obj == null || obj instanceof NULL;
957-
}
958-
959-
@Override
960-
public String toString()
961-
{
962-
return "NULL";
963-
}
964-
}
965935
}

SerialX-core/src/main/java/org/ugp/serialx/converters/NumberConverter.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
package org.ugp.serialx.converters;
22

33
import static org.ugp.serialx.Utils.contains;
4-
import static org.ugp.serialx.Utils.fastReplace;
5-
6-
import java.text.DecimalFormat;
7-
import java.text.DecimalFormatSymbols;
8-
import java.util.Locale;
94

105
/**
116
* This converter is capable of converting {@link Number} including all common implementations like {@link Double}, {@link Float}, {@link Integer} and others. They are determine by suffixes like in java!
@@ -93,19 +88,6 @@ <td>new Double(0.1e2)</td>
9388
*/
9489
public class NumberConverter implements DataConverter
9590
{
96-
/**
97-
* {@link DecimalFormat} to format decimal numbers (double, float) during serialization!<br>
98-
* Default {@link DecimalFormat} will round decimal numbers to 3 decimal places (format pattern #.###)!
99-
*
100-
* Set this on null and decimal numbers will not be formated! Do this when you need accuracy!
101-
*
102-
* @serial 1.1.0 (moved to {@link NumberConverter} since 1.3.0)
103-
*
104-
* @deprecated DO NOT USE! Override {@link NumberConverter#format(Object)} and write your format logic there instead!
105-
*/
106-
@Deprecated
107-
public static DecimalFormat decimalFormatter = new DecimalFormat("#.###", DecimalFormatSymbols.getInstance(Locale.US));
108-
10991
@Override
11092
public Object parse(ParserRegistry myHomeRegistry, String arg, Object... args)
11193
{
@@ -257,27 +239,4 @@ else if (ch != 127 && ch != '+')
257239
return (byte) result;
258240
return (int) result;
259241
}
260-
261-
/**
262-
* @deprecated THIS IS OBSOLET, SLOW AND NO LONGER NECESSARY BECAUSE {@link NumberConverter#numberOf(CharSequence, char, int, int, int)} CAN DO THE SAME THING MUCH FASTET!
263-
*
264-
* @param num | Number string to format!
265-
*
266-
* @return Original string with formated sign and deleted '_'!
267-
*
268-
* @since 1.3.0
269-
*/
270-
@Deprecated
271-
public static String normFormatNum(String num)
272-
{
273-
if (num.length() > 2)
274-
for (boolean minus = num.startsWith("+-") || num.startsWith("-+"); minus || num.startsWith("++") || num.startsWith("--"); minus = num.startsWith("+-") || num.startsWith("-+"))
275-
{
276-
num = num.substring(2);
277-
if (minus)
278-
num = "-"+num;
279-
}
280-
281-
return fastReplace(num, "_", "");
282-
}
283242
}

SerialX-json/src/main/java/org/ugp/serialx/json/JsonSerializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public JsonSerializer(Registry<DataParser> parsers, ProtocolRegistry protocols,
138138
super(parsers, protocols, variablesMap, values, parent);
139139
}
140140

141+
@Deprecated
141142
@Override
142143
public <T> String Var(String name, T value, boolean isValue)
143144
{

SerialX-juss/src/main/java/org/ugp/serialx/juss/JussSerializer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.net.URL;
2020
import java.net.URLConnection;
2121
import java.text.SimpleDateFormat;
22+
import java.util.AbstractMap;
2223
import java.util.ArrayList;
2324
import java.util.Arrays;
2425
import java.util.Collection;
@@ -205,20 +206,25 @@ public Scope clone(boolean absoluteClone)
205206
}
206207

207208
/**
209+
* @deprecated (1.3.9) DO NOT USE THIS, USE {@link VariableConverter#NewVariable(String, Object)} OR VARIATION OF {@link AbstractMap.SimpleEntry} INSTEAD!
210+
*
208211
* @param name | Name of variable.
209212
* @param value | Value of variable.
210213
*
211214
* @return Variable in JUSS form to serialize as [name] = [value].
212215
*
213216
* @since 1.1.5
214217
*/
218+
@Deprecated
215219
@Override
216220
public <T> String Var(String name, T value)
217221
{
218222
return Var(name, value, false);
219223
}
220224

221225
/**
226+
* @deprecated (1.3.9) DO NOT USE THIS, USE {@link VariableConverter#NewVariable(String, Object)} OR VARIATION OF {@link AbstractMap.SimpleEntry} INSTEAD!
227+
*
222228
* @param name | Name of variable.
223229
* @param value | Value of variable.
224230
* @param isValue | True if variables value supposed to by visible also during value loading.
@@ -227,6 +233,7 @@ public <T> String Var(String name, T value)
227233
*
228234
* @since 1.1.5
229235
*/
236+
@Deprecated
230237
public <T> String Var(String name, T value, boolean isValue)
231238
{
232239
return Code((isValue ? "$" : "") + name + " = " + getParsers().toString(value, this, 0, 0, getProtocols(), getFormat()) + (isGenerateComments() ? "; //Object of " + value.getClass().getName() + ": \"" + value + "\" inserted manually! Stored by \"" + name + "\" variable!" : ""));

SerialX-juss/src/main/java/org/ugp/serialx/juss/converters/OperationGroups.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@
2525
*/
2626
public class OperationGroups implements DataParser
2727
{
28-
/**
29-
* @deprecated (since 1.3.8) DO NOT USE, USE {@link OperationGroups#groupMark} instead! <br>
30-
*
31-
* Opening and closing of group mark!
32-
*
33-
* @since 1.3.0
34-
*/
35-
@Deprecated
36-
public static final char[] GROUP_MARK_OP = new char[] {127, 128, 129}, GROUP_MARK_CLS = new char[] {129, 128, 127};
37-
3828
/**
3929
* Character marking the opening of {@link OperationGroups} mark in processed string, closing should be marked as this character -1.<br>
4030
* This character is generated in sami-random fashion but it will never be an ASCII character.

SerialX-operators/src/main/java/org/ugp/serialx/converters/operators/ArithmeticOperators.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
*/
2323
public class ArithmeticOperators implements DataParser
2424
{
25-
/**
26-
* @deprecated DO NOT USE! USE {@link ArithmeticOperators#operator(Object, String, Object)} AND {@link ArithmeticOperators#getOperatorPriority(String)} INSTEAD!
27-
*/
28-
@Deprecated
29-
protected String[] priority1Oprs = {"*", "*-", "/", "/-", "%"}, priority2Oprs = {"**", "**-"};
30-
3125
/**
3226
* Operator characters recognized by {@link ArithmeticOperators}, operators can be any combination of provided characters. Exact behavior is handled by {@link ArithmeticOperators#operator(Object, String, Object)}.<br> Intended for override, should not be null or empty!
3327
*
@@ -514,31 +508,4 @@ public static Object toNum(Object obj)
514508
return (int) (char) obj;
515509
return obj;
516510
}
517-
518-
/**
519-
* @deprecated THIS WAS QUIET A MESSY WORKAROUND, DO NOT USE!<br>
520-
*
521-
* Used internally by {@link ArithmeticOperators} to wrap result of evaluation!
522-
* Mainly used by String results!
523-
*
524-
* @author PETO
525-
*
526-
* @since 1.3.0
527-
*/
528-
@Deprecated
529-
protected static class ResultWrapper
530-
{
531-
public final Object obj;
532-
533-
public ResultWrapper(Object obj)
534-
{
535-
this.obj = obj;
536-
}
537-
538-
@Override
539-
public String toString()
540-
{
541-
return obj.toString();
542-
}
543-
}
544511
}

0 commit comments

Comments
 (0)