68 lines
2.1 KiB
Java
68 lines
2.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.util;
|
|
|
|
import javax.baja.sys.BObject;
|
|
import javax.baja.sys.BString;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.BIValidator;
|
|
import javax.baja.util.CannotValidateException;
|
|
import javax.baja.util.Lexicon;
|
|
import javax.baja.util.Version;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public final class BVersionValidator
|
|
extends BObject
|
|
implements BIValidator {
|
|
public static final Type TYPE;
|
|
private static final Lexicon lex;
|
|
static /* synthetic */ Class class$javax$baja$util$BVersionValidator;
|
|
|
|
public final Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public final void validate(BObject bObject, Context context) throws CannotValidateException {
|
|
String string = null;
|
|
try {
|
|
string = ((BString)bObject).getString();
|
|
Version version = new Version(string);
|
|
}
|
|
catch (Exception exception) {
|
|
throw new CannotValidateException(lex.getText("versionValidator.invalid", new Object[]{string}));
|
|
}
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$util$BVersionValidator;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$util$BVersionValidator = BVersionValidator.class("[Ljavax.baja.util.BVersionValidator;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
Class clazz2 = class$javax$baja$util$BVersionValidator;
|
|
if (clazz2 == null) {
|
|
clazz2 = class$javax$baja$util$BVersionValidator = BVersionValidator.class("[Ljavax.baja.util.BVersionValidator;", false);
|
|
}
|
|
lex = Lexicon.make(clazz2);
|
|
}
|
|
}
|
|
|