本文整理了Java中org.jf.dexlib2.iface.ExceptionHandler.getExceptionType()
方法的一些代码示例,展示了ExceptionHandler.getExceptionType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExceptionHandler.getExceptionType()
方法的具体详情如下:
包路径:org.jf.dexlib2.iface.ExceptionHandler
类名称:ExceptionHandler
方法名:getExceptionType
[英]Gets the type of exception that is handled by this handler.
[中]获取此处理程序处理的异常类型。
代码示例来源:origin: JesusFreke/smali
@Nullable @Override public CharSequence getExceptionType(@Nonnull ExceptionHandler handler) {
return handler.getExceptionType();
}
代码示例来源:origin: Sable/soot
/**
* Return the types that are used in this body.
*/
public Set<Type> usedTypes() {
Set<Type> types = new HashSet<Type>();
for (DexlibAbstractInstruction i : instructions) {
types.addAll(i.introducedTypes());
}
if (tries != null) {
for (TryBlock<? extends ExceptionHandler> tryItem : tries) {
List<? extends ExceptionHandler> hList = tryItem.getExceptionHandlers();
for (ExceptionHandler handler : hList) {
String exType = handler.getExceptionType();
if (exType == null) {
// Exceptions
continue;
}
types.add(DexType.toSoot(exType));
}
}
}
return types;
}
代码示例来源:origin: CalebFenton/simplify
private String[] buildExceptions(Method method) {
if (method.getImplementation() == null) {
return null;
}
Set<String> exceptionTypes = new HashSet<>();
for (TryBlock<? extends ExceptionHandler> tryBlock : method.getImplementation()
.getTryBlocks()) {
for (ExceptionHandler handler : tryBlock.getExceptionHandlers()) {
String type = handler.getExceptionType();
if (type == null) {
// Type is null if it's a catchall
continue;
}
exceptionTypes.add(stripName(type));
}
}
return exceptionTypes.toArray(new String[0]);
}
代码示例来源:origin: CalebFenton/simplify
if (null == handler.getExceptionType()) {
return handler.getHandlerCodeAddress();
String handlerType = handler.getExceptionType();
if (className.equals(handlerType)) {
return handler.getHandlerCodeAddress();
代码示例来源:origin: JesusFreke/smali
handler.getExceptionType(), startAddress, endAddress, handlerAddress);
methodItems.add(catchMethodItem);
代码示例来源:origin: Sable/soot
if ("Ljava/lang/Throwable;".equals(handler.getExceptionType())) {
builder.addCatch(new ImmutableTypeReference(handler.getExceptionType()),
labelAssigner.getLabelAtAddress(range.startAddress), labelAssigner.getLabelAtAddress(range.endAddress),
labelAssigner.getLabelAtAddress(handler.getHandlerCodeAddress()));
代码示例来源:origin: JesusFreke/smali
private void analyzeMoveException(@Nonnull AnalyzedInstruction analyzedInstruction) {
int instructionAddress = getInstructionAddress(analyzedInstruction);
RegisterType exceptionType = RegisterType.UNKNOWN_TYPE;
for (TryBlock<? extends ExceptionHandler> tryBlock: methodImpl.getTryBlocks()) {
for (ExceptionHandler handler: tryBlock.getExceptionHandlers()) {
if (handler.getHandlerCodeAddress() == instructionAddress) {
String type = handler.getExceptionType();
if (type == null) {
exceptionType = RegisterType.getRegisterType(RegisterType.REFERENCE,
classPath.getClass("Ljava/lang/Throwable;"));
} else {
exceptionType = RegisterType.getRegisterType(RegisterType.REFERENCE, classPath.getClass(type))
.merge(exceptionType);
}
}
}
}
if (exceptionType.category == RegisterType.UNKNOWN) {
throw new AnalysisException("move-exception must be the first instruction in an exception handler block");
}
setDestinationRegisterTypeAndPropagateChanges(analyzedInstruction, exceptionType);
}
代码示例来源:origin: JesusFreke/smali
dexPool.typeSection.internNullable(handler.getExceptionType());
代码示例来源:origin: Sable/soot
String exceptionType = handler.getExceptionType();
if (exceptionType == null) {
exceptionType = "Ljava/lang/Throwable;";
代码示例来源:origin: JesusFreke/smali
if (ehLast.getExceptionType() == null) {
ehSize = ehSize * (-1) + 1;
代码示例来源:origin: testwhat/SmaliEx
@Override public int compare(ExceptionHandler o1, ExceptionHandler o2) {
String exceptionType1 = o1.getExceptionType();
if (exceptionType1 == null) {
if (o2.getExceptionType() != null) {
return 1;
}
return 0;
} else {
String exceptionType2 = o2.getExceptionType();
if (exceptionType2 == null) {
return -1;
}
return exceptionType1.compareTo(o2.getExceptionType());
}
}
};
代码示例来源:origin: KB5201314/ZjDroid
@Nullable @Override public CharSequence getExceptionType(@Nonnull ExceptionHandler handler) {
return handler.getExceptionType();
}
代码示例来源:origin: org.smali/dexlib2
@Override @Nullable public String getExceptionType() {
return RewriterUtils.rewriteNullable(rewriters.getTypeRewriter(), exceptionHandler.getExceptionType());
}
代码示例来源:origin: KB5201314/ZjDroid
@Override @Nullable public String getExceptionType() {
return RewriterUtils.rewriteNullable(rewriters.getTypeRewriter(), exceptionHandler.getExceptionType());
}
代码示例来源:origin: testwhat/SmaliEx
@Override
public boolean equals(@Nullable Object o) {
if (o instanceof ExceptionHandler) {
ExceptionHandler other = (ExceptionHandler)o;
return Objects.equal(getExceptionType(), other.getExceptionType()) &&
(getHandlerCodeAddress() == other.getHandlerCodeAddress());
}
return false;
}
代码示例来源:origin: testwhat/SmaliEx
public static ImmutableExceptionHandler of(ExceptionHandler exceptionHandler) {
if (exceptionHandler instanceof ImmutableExceptionHandler) {
return (ImmutableExceptionHandler)exceptionHandler;
}
return new ImmutableExceptionHandler(
exceptionHandler.getExceptionType(),
exceptionHandler.getHandlerCodeAddress());
}
代码示例来源:origin: org.smali/dexlib2
public static ImmutableExceptionHandler of(ExceptionHandler exceptionHandler) {
if (exceptionHandler instanceof ImmutableExceptionHandler) {
return (ImmutableExceptionHandler)exceptionHandler;
}
return new ImmutableExceptionHandler(
exceptionHandler.getExceptionType(),
exceptionHandler.getHandlerCodeAddress());
}
代码示例来源:origin: org.smali/dexlib2
@Override
public boolean equals(@Nullable Object o) {
if (o instanceof ExceptionHandler) {
ExceptionHandler other = (ExceptionHandler)o;
return Objects.equal(getExceptionType(), other.getExceptionType()) &&
(getHandlerCodeAddress() == other.getHandlerCodeAddress());
}
return false;
}
代码示例来源:origin: KB5201314/ZjDroid
public static ImmutableExceptionHandler of(ExceptionHandler exceptionHandler) {
if (exceptionHandler instanceof ImmutableExceptionHandler) {
return (ImmutableExceptionHandler)exceptionHandler;
}
return new ImmutableExceptionHandler(
exceptionHandler.getExceptionType(),
exceptionHandler.getHandlerCodeAddress());
}
代码示例来源:origin: KB5201314/ZjDroid
@Override
public boolean equals(@Nullable Object o) {
if (o instanceof ExceptionHandler) {
ExceptionHandler other = (ExceptionHandler)o;
return Objects.equal(getExceptionType(), other.getExceptionType()) &&
(getHandlerCodeAddress() == other.getHandlerCodeAddress());
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!