Package org.codehaus.backport175.reader.bytecode

Examples of org.codehaus.backport175.reader.bytecode.AnnotationElement$Enum


     */
    Atom[] getWmState(Display display, Window win) {
  ArrayList<Atom> res = new ArrayList<Atom>();
  Window.PropertyReply rep = win.property(false, netWmState, Atom.ATOM,
    0, 5);
  Enum enm = rep.items();
  while (enm.more()) {
      Atom atom = (Atom) Atom.intern(display, enm.next_integer());
      res.add(atom);
      logger.fine("WM State: " + win + " " + atom);
  }
  if (res.size() > 0) {
      return res.toArray(new Atom[res.size()]);
View Full Code Here


  Atom res = null;
  Window.PropertyReply rep = win.property(false, windowTypes[0],
    Atom.ATOM, 0, 1);

  if (rep.length() == 1) {
      Enum enm = rep.items();
      res = (Atom) Atom.intern(display, enm.next_integer(), true);
  } else {
      /** if not set by application assume NORMAL TYPE */
      res = (Atom) Atom.intern(display, "_NET_WM_WINDOW_TYPE_NORMAL");
  }
  logger.fine("WM Type: " + win + " " + res);
View Full Code Here

 
    /**
     *
     */
    public Enum rectangles () {
      return new Enum (this, 32, rectangle_count ()) {
        @Override
        public Object next () {
          int x = this.read2 (0);
          int y = this.read2 (2);
          int width = this.read2 (4);
View Full Code Here

    public void insertClassAnnotation(final RawAnnotation annotation) {
        if (m_reader == null) {
            throw new IllegalStateException("annotation enhancer is not initialized");
        }
        if (hasClassAnnotation(annotation)) {
            throw new CompilerException(
                    "duplicate class annotation " + annotation,
                    SourceLocation.render(annotation)
            );
        }
        m_classAnnotations.add(annotation);
View Full Code Here

        if (m_reader == null) {
            throw new IllegalStateException("annotation enhancer is not initialized");
        }
        FieldAnnotationInfo info = new FieldAnnotationInfo(field, annotation);
        if (hasFieldAnnotation(info)) {
            throw new CompilerException(
                    "duplicate field annotation " + annotation,
                    SourceLocation.render(annotation)
            );
        }
        m_fieldAnnotations.add(new FieldAnnotationInfo(field, annotation));
View Full Code Here

        if (m_reader == null) {
            throw new IllegalStateException("annotation enhancer is not initialized");
        }
        MethodAnnotationInfo info = new MethodAnnotationInfo(constructor, annotation);
        if (hasConstructorAnnotation(info)) {
            throw new CompilerException(
                    "duplicate constructor annotation " + annotation,
                    SourceLocation.render(annotation)
            );
        }
        m_constructorAnnotations.add(new MethodAnnotationInfo(constructor, annotation));
View Full Code Here

        File file = new File(filename);
        File parentFile = file.getParentFile();
        if (!parentFile.exists()) {
            // directory does not exist create all directories in the filename
            if (!parentFile.mkdirs()) {
                throw new CompilerException(
                        "could not create dir structure needed to write file " + filename + " to disk"
                );
            }
        }
        FileOutputStream os = null;
        try {
            os = new FileOutputStream(filename);
            os.write(writer.toByteArray());
        } catch (IOException e) {
            throw new CompilerException("could not write compiled class file to disk [" + filename + "]", e);
        } finally {
            try {
                os.close();
            } catch (IOException e) {
                throw new CompilerException("could not close file output stream for [" + filename + "]", e);
            }
        }
    }
View Full Code Here

        /**
         * Helper to stdout
         */
        public void dump() {
            for (Iterator iterator = compilerExceptions.iterator(); iterator.hasNext();) {
                CompilerException compilerException = (CompilerException) iterator.next();
                System.out.println("ERROR: "+ compilerException.toString());
            }
            for (Iterator iterator = acceptedLocations.iterator(); iterator.hasNext();) {
                SourceLocation sourceLocation = (SourceLocation) iterator.next();
                System.out.println("OK: " + sourceLocation.toString());
            }
View Full Code Here

            for (Iterator iterator = compilerExceptions.iterator(); iterator.hasNext();) {
                CompilerException compilerException = (CompilerException) iterator.next();
                System.out.println("ERROR: "+ compilerException.toString());
            }
            for (Iterator iterator = acceptedLocations.iterator(); iterator.hasNext();) {
                SourceLocation sourceLocation = (SourceLocation) iterator.next();
                System.out.println("OK: " + sourceLocation.toString());
            }
        }
View Full Code Here

            }
            destDirToUse = classpath[0];
        }

        // set up the parser sources
        final JavaDocParser javaDocParser = new JavaDocParser();
        try {
            // add classloader
            javaDocParser.addClassLoaderToSearchPath(compilationLoader);

            // add src dirs
            StringBuffer logDirs = new StringBuffer("parsing source dirs:");
            for (int i = 0; i < srcDirs.length; i++) {
                logDirs.append("\n\t" + srcDirs[i]);
            }
            messageHandler.info(logDirs.toString());
            javaDocParser.addSourceTrees(srcDirs);

            // add src files
            logDirs = new StringBuffer();
            for (int i = 0; i < srcFiles.length; i++) {
                logDirs.append("\n\t" + srcFiles[i]);
                javaDocParser.addSource(srcFiles[i]);
            }
            if (srcFiles.length > 0) {
                messageHandler.info(logDirs.toString());
            }
View Full Code Here

TOP

Related Classes of org.codehaus.backport175.reader.bytecode.AnnotationElement$Enum

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.