本文整理汇总了Java中org.osgl.util.S.eq方法的典型用法代码示例。如果您正苦于以下问题:Java S.eq方法的具体用法?Java S.eq怎么用?Java S.eq使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.osgl.util.S
的用法示例。
在下文中一共展示了S.eq方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invoke
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
String methodName = method.getName();
if (S.eq("hashCode", methodName)) {
return hashCode();
} else if (S.eq("equals", methodName)) {
return equals(args[0]);
} else if (S.eq("annotationType", methodName)) {
return type;
} else if (S.eq("toString", methodName)) {
return toString();
}
Object result = method.getDefaultValue();
if (result == null) {
throw new IncompleteAnnotationException(type, methodName);
}
return result;
}
示例2: loadSourceInfo
import org.osgl.util.S; //导入方法依赖的package包/类
public static SourceInfo loadSourceInfo(StackTraceElement[] stackTraceElements, Class<? extends ActError> errClz) {
E.illegalStateIf(Act.isProd());
DevModeClassLoader cl = (DevModeClassLoader) App.instance().classLoader();
for (StackTraceElement stackTraceElement : stackTraceElements) {
int line = stackTraceElement.getLineNumber();
if (line <= 0) {
continue;
}
String className = stackTraceElement.getClassName();
if (S.eq(errClz.getName(), className)) {
continue;
}
Source source = cl.source(className);
if (null == source) {
continue;
}
return new SourceInfoImpl(source, line);
}
return null;
}
示例3: equals
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof SysEventListener) {
SysEventListener that = (SysEventListener) obj;
return S.eq(that.id(), this.id());
}
return false;
}
示例4: visitMethod
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
if (metaInfo.hasDataAnnotation()) {
if (S.eq("hashCode", name) && S.eq("()I", desc)) {
metaInfo.hashCodeMethodFound();
} else if (S.eq("equals", name) && S.eq("(Ljava/lang/Object;)Z", desc)) {
metaInfo.equalMethodFound();
}
}
return mv;
}
示例5: verifyToken
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public boolean verifyToken(String token, H.Session session, App app) {
String tokenInSession = session.get(app.config().csrfCookieName());
if (S.eq(token, tokenInSession)) {
return true;
}
AppCrypto crypto = Act.crypto();
return S.eq(crypto.decrypt(token), crypto.decrypt(tokenInSession));
}
示例6: valueOfIgnoreCase
import org.osgl.util.S; //导入方法依赖的package包/类
public static CSRFProtector valueOfIgnoreCase(String s) {
if (S.eq(HMAC.name(), s.toUpperCase())) {
return HMAC;
} else if (S.eq(RANDOM.name(), s.toUpperCase())) {
return RANDOM;
}
return null;
}
示例7: isErrorSpot
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public boolean isErrorSpot(String traceLine, String nextTraceLine) {
if (null == errorSpotTraceLine) {
errorSpotTraceLine = findErrorSpotTraceLine(stackTrace());
}
return S.eq(traceLine, errorSpotTraceLine);
}
示例8: interceptor
import org.osgl.util.S; //导入方法依赖的package包/类
private InterceptorMethodMetaInfo interceptor(List<? extends InterceptorMethodMetaInfo> list, String className, String methodName) {
String fullName = S.join(".", "testapp.controller", className, methodName);
for (InterceptorMethodMetaInfo info : list) {
if (S.eq(fullName, info.fullName())) {
return info;
}
}
return null;
}
示例9: visitAnnotation
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
if (!found) {
String className = Type.getType(desc).getClassName();
if (S.eq(TRANSFORMER, className)) {
found = true;
}
}
return super.visitAnnotation(desc, visible);
}
示例10: action
import org.osgl.util.S; //导入方法依赖的package包/类
public JobMethodMetaInfo action(String name) {
if (null == actionLookup) {
for (JobMethodMetaInfo act : actions) {
if (S.eq(name, act.name())) {
return act;
}
}
return null;
}
return actionLookup.get(name);
}
示例11: equals
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof Command) {
Command that = (Command)obj;
return S.eq(that.name(), name());
}
return false;
}
示例12: sender
import org.osgl.util.S; //导入方法依赖的package包/类
public SenderMethodMetaInfo sender(String name) {
if (null == mailerLookup) {
for (SenderMethodMetaInfo act : senders) {
if (S.eq(name, act.name())) {
return act;
}
}
return null;
}
return mailerLookup.get(name);
}
示例13: action
import org.osgl.util.S; //导入方法依赖的package包/类
public ActionMethodMetaInfo action(String name) {
if (null == actionLookup) {
for (ActionMethodMetaInfo act : actions) {
if (S.eq(name, act.name())) {
return act;
}
}
return null;
}
return actionLookup.get(name);
}
示例14: visit
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public void visit(String name, Object value) {
if (S.eq("group", name)) {
optionAnnoInfo.group((String) value);
} else if (S.eq("defVal", name)) {
optionAnnoInfo.defVal((String) value);
} else if (S.eq("value", name) || S.eq("help", name)) {
optionAnnoInfo.help((String) value);
}
super.visit(name, value);
}
示例15: equals
import org.osgl.util.S; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof NamedPort) {
NamedPort that = (NamedPort) obj;
return S.eq(that.name, name);
}
return false;
}