Examples of Names


Examples of com.sun.tools.javac.util.Names

    private MethodDocImpl searchMethod(String methodName,
                                       String[] paramTypes, Set<ClassDocImpl> searched) {
        //### Note that this search is not necessarily what the compiler would do!

        Names names = tsym.name.table.names;
        // do not match constructors
        if (names.init.contentEquals(methodName)) {
            return null;
        }

        ClassDocImpl cdi;
        MethodDocImpl mdi;

        if (searched.contains(this)) {
            return null;
        }
        searched.add(this);

        //DEBUG
        /*---------------------------------*
         System.out.print("searching " + this + " for " + methodName);
         if (paramTypes == null) {
         System.out.println("()");
         } else {
         System.out.print("(");
         for (int k=0; k < paramTypes.length; k++) {
         System.out.print(paramTypes[k]);
         if ((k + 1) < paramTypes.length) {
         System.out.print(", ");
         }
         }
         System.out.println(")");
         }
         *---------------------------------*/

        // search current class
        Scope.Entry e = tsym.members().lookup(names.fromString(methodName));

        //### Using modifier filter here isn't really correct,
        //### but emulates the old behavior.  Instead, we should
        //### apply the normal rules of visibility and inheritance.

View Full Code Here

Examples of com.sun.tools.javac.util.Names

     * @param paramTypes the array of Strings for constructor parameters.
     * @return the first ConstructorDocImpl which matches, null if not found.
     */
    public ConstructorDoc findConstructor(String constrName,
                                          String[] paramTypes) {
        Names names = tsym.name.table.names;
        for (Scope.Entry e = tsym.members().lookup(names.fromString("<init>")); e.scope != null; e = e.next()) {
            if (e.sym.kind == Kinds.MTH) {
                if (hasParameterTypes((MethodSymbol)e.sym, paramTypes)) {
                    return env.getConstructorDoc((MethodSymbol)e.sym);
                }
            }
View Full Code Here

Examples of com.sun.tools.javac.util.Names

    public FieldDoc findField(String fieldName) {
        return searchField(fieldName, new HashSet<ClassDocImpl>());
    }

    private FieldDocImpl searchField(String fieldName, Set<ClassDocImpl> searched) {
        Names names = tsym.name.table.names;
        if (searched.contains(this)) {
            return null;
        }
        searched.add(this);

        for (Scope.Entry e = tsym.members().lookup(names.fromString(fieldName)); e.scope != null; e = e.next()) {
            if (e.sym.kind == Kinds.VAR) {
                //### Should intern fieldName as Name.
                return env.getFieldDoc((VarSymbol)e.sym);
            }
        }
View Full Code Here

Examples of com.sun.tools.javac.util.Names

        if (tsym.sourcefile == null) return new PackageDoc[0];

        ListBuffer<PackageDocImpl> importedPackages = new ListBuffer<PackageDocImpl>();

        //### Add the implicit "import java.lang.*" to the result
        Names names = tsym.name.table.names;
        importedPackages.append(env.getPackageDoc(env.reader.enterPackage(names.java_lang)));

        Env<AttrContext> compenv = env.enter.getEnv(tsym);
        if (compenv == null) return new PackageDocImpl[0];

View Full Code Here

Examples of com.sun.tools.javac.util.Names

        }

        /** Enter a set of generated class files. */
        private List<ClassSymbol> enterClassFiles(Map<String, JavaFileObject> classFiles) {
            ClassReader reader = ClassReader.instance(context);
            Names names = Names.instance(context);
            List<ClassSymbol> list = List.nil();

            for (Map.Entry<String,JavaFileObject> entry : classFiles.entrySet()) {
                Name name = names.fromString(entry.getKey());
                JavaFileObject file = entry.getValue();
                if (file.getKind() != JavaFileObject.Kind.CLASS)
                    throw new AssertionError(file);
                ClassSymbol cs;
                if (isPkgInfo(file, JavaFileObject.Kind.CLASS)) {
View Full Code Here

Examples of com.sun.tools.javac.util.Names

            Assert.checkNonNull(messages);
            next.put(JavacMessages.messagesKey, messages);

            final boolean shareNames = true;
            if (shareNames) {
                Names names = Names.instance(context);
                Assert.checkNonNull(names);
                next.put(Names.namesKey, names);
            }

            DiagnosticListener<?> dl = context.get(DiagnosticListener.class);
            if (dl != null)
                next.put(DiagnosticListener.class, dl);

            MultiTaskListener mtl = context.get(MultiTaskListener.taskListenerKey);
            if (mtl != null)
                next.put(MultiTaskListener.taskListenerKey, mtl);

            FSInfo fsInfo = context.get(FSInfo.class);
            if (fsInfo != null)
                next.put(FSInfo.class, fsInfo);

            JavaFileManager jfm = context.get(JavaFileManager.class);
            Assert.checkNonNull(jfm);
            next.put(JavaFileManager.class, jfm);
            if (jfm instanceof JavacFileManager) {
                ((JavacFileManager)jfm).setContext(next);
            }

            Names names = Names.instance(context);
            Assert.checkNonNull(names);
            next.put(Names.namesKey, names);

            Tokens tokens = Tokens.instance(context);
            Assert.checkNonNull(tokens);
View Full Code Here

Examples of com.uwyn.drone.protocol.commands.Names

        if (!seens_waiting.contains(seen))
        {
          seens_waiting.add(seen);
         
          // request the current list of names in the channel
          bot.send(new Names(channel.getName()));
        }
      }
    }
  }
View Full Code Here

Examples of com.uwyn.drone.protocol.commands.Names

        if (!message_seen.getNicks().contains(nick))
        {
          message_seen.getNicks().add(nick);
         
          // request the current list of names in the channel
          bot.send(new Names(channel.getName()));
        }
      }
    }
  }
View Full Code Here

Examples of macromedia.asc.util.Names

        }
    }

  private void FinishTraits(ObjectValue obj, ObjectList<ByteList> traits)
  {
    Names names = obj.builder.getNames();
       
        if (names != null)
        {
          if(Builder.removeBuilderNames)
          //if(false)
          {
            // addSlotTraits/addMethodTraits ignore's the value of the Qualifier so a list of
            // namespaces would suffice although even better to refactor these methods to take
            // one namespace at a time
            Qualifiers q = new Qualifiers();
            for (int i = 0; (i = names.hasNext(i)) != -1; i++)
            {
              q.clear();
              int slotId = names.getSlot(i);
             
                  String name = names.getName(i);         
                  q.put(names.getNamespace(i), 0);

              if(slotId < 1)
                continue;

              Slot s = obj.getSlot(cx, slotId);

                    if (names.getNamespace(i) == ObjectValue.loopLabelNamespace || s == null)
                        continue;
                   
              if(s.declaredBy != obj)
                continue;
             
              if(s instanceof VariableSlot && names.getType(i) != Names.SET_NAMES)
              {
                       addSlotTrait(obj, traits, name, q);
                   }            
             
             
              if(s instanceof MethodSlot)
                   {
                int methodKind = TRAIT_Method;
                if(s.isGetter())
                  methodKind = TRAIT_Getter;
                if(names.getType(i) == Names.SET_NAMES)
                  methodKind = TRAIT_Setter;           
                       addMethodTrait(methodKind, obj, traits, name, q);
                   }
            }
          }
          else
          {
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.VAR_NAMES))
              {
                  // Add trait for multiname var
                  addSlotTrait(obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.METHOD_NAMES))
              {
                  addMethodTrait(TRAIT_Method,obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.GET_NAMES))
              {
                  addMethodTrait(TRAIT_Getter,obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.SET_NAMES))
              {
                  addMethodTrait(TRAIT_Setter,obj,traits,n.getKey(), n.getValue());
              }
          }
        }
View Full Code Here

Examples of macromedia.asc.util.Names

        // C: Trace.debug??
        // if( debug ) printf("ObjectValue::defineName() name = %s, kind = %s, slot_index = %d\n",name.c_str(),Token::getTokenClassName(kind).c_str(),slot_index);

        if (names == null)
        {
            names = new Names();
        }

        if (this.hasName(cx, kind, name, qualifier) )
        {
            return 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.