Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.ClassNode


    private ClassNode convertBytecodeToClassNode(byte[] bytecode)
    {
        ClassReader cr = new ClassReader(bytecode);

        ClassNode result = new ClassNode();

        cr.accept(result, 0);

        return result;
    }
View Full Code Here


    public PlasticClassTransformation createTransformation(String baseClassName, String newClassName)
    {
        try
        {
            ClassNode newClassNode = new ClassNode();

            newClassNode.visit(V1_5, ACC_PUBLIC, PlasticInternalUtils.toInternalName(newClassName), null,
                    PlasticInternalUtils.toInternalName(baseClassName), null);

            return createTransformation(baseClassName, newClassNode);
        }
        catch (ClassNotFoundException ex)
View Full Code Here

     * @param config annotation
     */
    BlueprintingVisitor(final Privilizer privilizer,
        final ClassVisitor cv, //NOPMD
        final Privilizing config) {
        privilizer.super(new ClassNode(Opcodes.ASM4));
        this.next = cv;

        // load up blueprint methods:
        for (final Privilizing.CallTo callTo : config.value()) {
            final Type blueprintType = Type.getType(callTo.value());
View Full Code Here

    private Map<Method, MethodNode> getMethods(final Type type) {
        if (methodCache.containsKey(type)) {
            return methodCache.get(type);
        }
        final ClassNode classNode = read(type.getClassName());
        final Map<Method, MethodNode> result = new HashMap<Method, MethodNode>();

        @SuppressWarnings("unchecked")
        final List<MethodNode> methods = classNode.methods;
View Full Code Here

        methodCache.put(type, result);
        return result;
    }

    private ClassNode read(final String className) {
        final ClassNode result = new ClassNode(Opcodes.ASM4);
        InputStream bytecode = null;
        try {
            bytecode = privilizer().env.getClassfile(className).getInputStream();
            new ClassReader(bytecode).accept(result, ClassReader.SKIP_DEBUG | ClassReader.EXPAND_FRAMES);
        } catch (final Exception e) {
View Full Code Here

        final ClassReader cr,
        final ClassLoader loader,
        final boolean dump,
        final PrintWriter pw)
    {
        ClassNode cn = new ClassNode();
        cr.accept(new CheckClassAdapter(cn, false), ClassReader.SKIP_DEBUG);

        Type syperType = cn.superName == null
                ? null
                : Type.getObjectType(cn.superName);
View Full Code Here

    final InputStream stream = loader.getResourceAsStream(path);

    final ClassReader reader = new ClassReader(stream);

    final ClassNode node = new ClassNode();

    reader.accept(node, SKIP_MODE);

    return node;
  }
View Full Code Here

   * Check component annotation on a class.
   */
  public static boolean hasComponentAnno(final Class<?> klaz)
      throws Exception {

    final ClassNode node = classNode(klaz);

    final AnnotationNode anno = componentAnno(node);

    return anno != null;

View Full Code Here

      return bean;
    }

    for (final Class<?> type : typeList) {

      final ClassNode node = UtilAsm.classNode(type);

      applyServiceInferred(bean, type);

      applyPropertyEmbedded(bean, type, node);
View Full Code Here

        final ClassReader cr,
        final ClassLoader loader,
        final boolean dump,
        final PrintWriter pw)
    {
        ClassNode cn = new ClassNode();
        cr.accept(new CheckClassAdapter(cn, false), ClassReader.SKIP_DEBUG);

        Type syperType = cn.superName == null
                ? null
                : Type.getObjectType(cn.superName);
View Full Code Here

TOP

Related Classes of org.objectweb.asm.tree.ClassNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.