Tabnine Logo
ClassAdapter
Code IndexAdd Tabnine to your IDE (free)

How to use
ClassAdapter
in
org.objectweb.asm

Best Java code snippets using org.objectweb.asm.ClassAdapter (Showing top 20 results out of 315)

origin: alibaba/TProfiler

public MethodVisitor visitMethod(int arg, String name, String descriptor, String signature, String[] exceptions) {
  if (Manager.isIgnoreGetSetMethod()) {
    if (fieldNameList.contains(name)) {
      return super.visitMethod(arg, name, descriptor, signature, exceptions);
    }
  }
  // 静态区域不注入
  if ("<clinit>".equals(name)) {
    return super.visitMethod(arg, name, descriptor, signature, exceptions);
  }
  MethodVisitor mv = super.visitMethod(arg, name, descriptor, signature, exceptions);
  MethodAdapter ma = new ProfMethodAdapter(mv, mFileName, mClassName, name);
  return ma;
}
origin: alibaba/TProfiler

public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
  super.visit(version, access, name, signature, superName, interfaces);
}
origin: alibaba/TProfiler

public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
  String up = name.substring(0, 1).toUpperCase() + name.substring(1, name.length());
  String getFieldName = "get" + up;
  String setFieldName = "set" + up;
  String isFieldName = "is" + up;
  fieldNameList.add(getFieldName);
  fieldNameList.add(setFieldName);
  fieldNameList.add(isFieldName);
  return super.visitField(access, name, desc, signature, value);
}
origin: vsilaev/tascalate-javaflow

@Override
public void visitEnd() {
  if (!skipEnchancing) {
    super.visitField(
      (isInterface ? Opcodes.ACC_PUBLIC : Opcodes.ACC_PRIVATE) + Opcodes.ACC_FINAL + Opcodes.ACC_STATIC, 
      MaybeContinuableClassVisitor.MARKER_FIELD_NAME, 
      "Ljava/lang/String;", 
      null, 
      "A"
    ).visitEnd();
  }
  super.visitEnd();
}
origin: david-schuler/javalanche

@Override
public void visitEnd() {
  super.visitEnd();
}
origin: foursquare/heapaudit

public HeapClass(ClassVisitor cv,
         String classId,
         boolean suppressAuditing,
         boolean debugAuditing) {
  this.cv = new ClassAdapter(cv);
  this.id = classId;
  this.suppressClass = suppressAuditing;
  this.debugClass = debugAuditing;
  log(debugClass,
    "{ # CLASS " + id);
}
origin: alibaba/TProfiler

public void visitSource(final String source, final String debug) {
  super.visitSource(source, debug);
  mFileName = source;
}
origin: foursquare/heapaudit

public void visitEnd() {
  log(debugClass,
    "\tvisitEnd()\n}");
  cv.visitEnd();
}
origin: stackoverflow.com

final AtomicReference<Method> holder = new AtomicReference<Method>();
cr.accept(new ClassAdapter(empty){
origin: org.eclipse/xtext

  @Override
  public void visitSource(String source, String debug) {
    super.visitSource(sourceFile, debug);
  }
}
origin: org.lwjgl.lwjgl/lwjgl_util

  public MethodVisitor visitMethod(int access, final String name, final String desc, final String signature, final String[] exceptions) {
    for ( String method : DEFINALIZE_LIST ) {
      if ( name.equals(method) ) {
        access &= ~ACC_FINAL;
        break;
      }
    }
    return super.visitMethod(access, name, desc, signature, exceptions);
  }
};
origin: net.sourceforge.retroweaver/retroweaver

public void visit(
  final int version,
  final int access,
  final String name,
  final String signature,
  final String superName,
  final String[] interfaces)
{
  super.visit(version, access, name, null, superName, interfaces);
}
origin: net.sourceforge.retroweaver/retroweaver

public FieldVisitor visitField(
  final int access,
  final String name,
  final String desc,
  final String signature,
  final Object value)
{
  return super.visitField(access, name, desc, null, value);
}
origin: org.lwjgl.lwjgl/lwjgl_util

@Override
public void visitEnd() {
  final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className);
  generateViewAddressGetter();
  generateCapacity();
  generateAlignGetter(mappedSubtype);
  generateSizeofGetter();
  generateNext();
  for ( String fieldName : mappedSubtype.fields.keySet() ) {
    final FieldInfo field = mappedSubtype.fields.get(fieldName);
    if ( field.type.getDescriptor().length() > 1 ) {  // ByteBuffer, getter only
      generateByteBufferGetter(fieldName, field);
    } else {
      generateFieldGetter(fieldName, field);
      generateFieldSetter(fieldName, field);
    }
  }
  super.visitEnd();
}
origin: stackoverflow.com

reader.accept(new ClassAdapter(new EmptyVisitor()) {
  @Override
  public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) {
origin: foursquare/heapaudit

public void visitSource(String source,
            String debug) {
  log(debugClass,
    "\tvisitSource(" + source + ", " + debug + ")");
  this.source = source;
  cv.visitSource(source,
          debug);
}
origin: org.lwjgl.lwjgl/lwjgl_util

private void generateSizeofGetter() {
  MethodVisitor mv = super.visitMethod(ACC_PUBLIC, SIZEOF_METHOD_NAME, "()I", null, null);
  mv.visitCode();
  mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I");
  mv.visitInsn(IRETURN);
  mv.visitMaxs(1, 1);
  mv.visitEnd();
}
origin: david-schuler/javalanche

public void visit(int version, int access, String name, String signature,
    String superName, String[] interfaces) {
  super.visit(version, access, name, signature, superName, interfaces);
  this.classAccess = access;
}
origin: vsilaev/tascalate-javaflow

@Override
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
  if (MaybeContinuableClassVisitor.MARKER_FIELD_NAME.equals(name) && (access & Opcodes.ACC_STATIC) != 0) {
    skipEnchancing = true;
    classInfo.markClassProcessed();
    throw StopException.INSTANCE;
  }
  return super.visitField(access, name, desc, signature, value);
}
origin: com.google.code.maven-play-plugin.net.sourceforge.cobertura/cobertura

/**
 * @param source In the format "ClassInstrumenter.java"
 */
public void visitSource(String source, String debug)
{
  super.visitSource(source, debug);
  classData.setSourceFileName(source);
}
org.objectweb.asmClassAdapter

Most used methods

  • visitMethod
  • visit
  • visitField
  • visitEnd
  • visitSource
  • <init>
  • visitAnnotation
  • visitAttribute
  • visitInnerClass
  • visitOuterClass

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now