org.objectweb.asm.tree.TypeAnnotationNode Java Examples

The following examples show how to use org.objectweb.asm.tree.TypeAnnotationNode. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IntegrationTestSupport.java    From turbine with Apache License 2.0 5 votes vote down vote up
private static void sortTypeAnnotations(List<TypeAnnotationNode> annos) {
  if (annos == null) {
    return;
  }
  annos.sort(
      Comparator.comparing((TypeAnnotationNode a) -> a.desc)
          .thenComparing(a -> String.valueOf(a.typeRef))
          .thenComparing(a -> String.valueOf(a.typePath))
          .thenComparing(a -> String.valueOf(a.values)));
}
 
Example #2
Source File: TryCatchFixer.java    From deobfuscator with Apache License 2.0 5 votes vote down vote up
public TryCatchChain(LabelNode handler, String type, List<TypeAnnotationNode> visibleTypeAnnotations,
	List<TypeAnnotationNode> invisibleTypeAnnotations)
{
	this.handler = handler;
	this.type = type;
	this.visibleTypeAnnotations = visibleTypeAnnotations;
	this.invisibleTypeAnnotations = invisibleTypeAnnotations;
	covered = new ArrayList<>();
}
 
Example #3
Source File: AbstractAsyncMethodTransformer.java    From tascalate-async-await with BSD 2-Clause "Simplified" License 5 votes vote down vote up
protected static List<TypeAnnotationNode> copyTypeAnnotations(List<TypeAnnotationNode> originalAnnotations) {
    if (null == originalAnnotations || originalAnnotations.isEmpty()) {
        return null;
    }
    return originalAnnotations
        .stream()
        .map(t -> new TypeAnnotationNode(t.typeRef, t.typePath, t.desc))
        .collect(Collectors.toCollection(ArrayList::new));
}
 
Example #4
Source File: IntegrationTestSupport.java    From turbine with Apache License 2.0 4 votes vote down vote up
private static void addTypesInTypeAnnotations(Set<String> types, List<TypeAnnotationNode> annos) {
  if (annos == null) {
    return;
  }
  annos.forEach(a -> collectTypesFromAnnotation(types, a));
}
 
Example #5
Source File: BytecodeIntrospection.java    From tascalate-async-await with BSD 2-Clause "Simplified" License 4 votes vote down vote up
static List<TypeAnnotationNode> visibleTypeAnnotationsOf(MethodNode methodNode) {
    return safeAnnotationsList(methodNode.visibleTypeAnnotations);
}
 
Example #6
Source File: BytecodeIntrospection.java    From tascalate-async-await with BSD 2-Clause "Simplified" License 4 votes vote down vote up
static List<TypeAnnotationNode> visibleTypeAnnotationsOf(TryCatchBlockNode tryCatchBlockNode) {
    return safeAnnotationsList(tryCatchBlockNode.visibleTypeAnnotations);
}
 
Example #7
Source File: BytecodeIntrospection.java    From tascalate-async-await with BSD 2-Clause "Simplified" License 4 votes vote down vote up
static List<TypeAnnotationNode> invisibleTypeAnnotationsOf(MethodNode methodNode) {
    return safeAnnotationsList(methodNode.invisibleTypeAnnotations);
}
 
Example #8
Source File: BytecodeIntrospection.java    From tascalate-async-await with BSD 2-Clause "Simplified" License 4 votes vote down vote up
static List<TypeAnnotationNode> invisibleTypeAnnotationsOf(TryCatchBlockNode tryCatchBlockNode) {
    return safeAnnotationsList(tryCatchBlockNode.invisibleTypeAnnotations);
}