Examples of Ref


Examples of com.sun.enterprise.config.serverbeans.Ref

        List<Ref> serverOrClusters = _lbConfig.getClusterRefOrServerRef();
        ClusterReader[] cls = new ClusterReader[serverOrClusters.size()];
        Iterator<Ref> iter = serverOrClusters.iterator();
        int i = 0;
        while (iter.hasNext()) {
            Ref ref = iter.next();
            if (ref instanceof ServerRef) {
                cls[i++] = new StandAloneClusterReaderImpl(_domain,
                        _appRegistry, (ServerRef) ref);

            } else if (ref instanceof ClusterRef) {
                cls[i++] = new ClusterReaderImpl(_domain, _appRegistry,
                        (ClusterRef) ref);
            } else {
                String msg = LbLogUtil.getStringManager().getString("UnableToDetermineType", ref.getRef());
                throw new LbReaderException(msg);
            }
        }
        return cls;
    }
View Full Code Here

Examples of com.sun.jersey.server.linking.Ref

     * interfaces.
     * @param entityClass the class
     */
    private void findFields(Class<?> entityClass) {
        for (Field f: entityClass.getDeclaredFields()) {
            Ref a = f.getAnnotation(Ref.class);
            if (a != null) {
                Class<?> t = f.getType();
                if (t.equals(String.class) || t.equals(URI.class)) {
                    if (!linkFields.containsKey(f.getName())) {
                        linkFields.put(f.getName(), new RefFieldDescriptor(f, a, t));
View Full Code Here

Examples of com.sun.tools.txw2.model.Ref

            def = grammar.get(mg.getName()); // TODO: name collision detection and avoidance
            modelGroups.put(mg,def);

            def.addChild(mg.getModelGroup().apply(this));
        }
        return new Ref(mg.getLocator(),def);
    }
View Full Code Here

Examples of com.sun.xml.bind.v2.model.core.Ref

/* 427 */     for (Class c : this.classes) {
/* 428 */       if (c == CompositeStructure.class)
/*     */       {
/*     */         continue;
/*     */       }
/* 432 */       builder.getTypeInfo(new Ref(c));
/*     */     }
/*     */
/* 435 */     this.hasSwaRef |= builder.hasSwaRef;
/* 436 */     RuntimeTypeInfoSet r = builder.link();
/*     */
View Full Code Here

Examples of java.sql.Ref

                case 11:{Date v=rs.getDate(col);o=v; break;}
                case 12:{double v=rs.getDouble(col);o=new Double(v);break;}
                case 13:{float v=rs.getFloat(col);o=new Float(v);break;}
                case 14:{int v=rs.getInt(col);o=new Integer(v);break;}
                case 15:{long v=rs.getLong(col);o=new Long(v);break;}
                case 16:{Ref v=rs.getRef(col);o=v;break;}
                case 17:{short v=rs.getShort(col);o=new Short(v);break;}
                case 18:{String v=rs.getString(col);o=v;break;}
                case 19:{Time v=rs.getTime(col);o=v;break;}
                case 20:{Timestamp v=rs.getTimestamp(col);o=v;break;}
//        case 21:{URL v=rs.getURL(col);o=v;break;}
                default: return null;
            }
            // fixup if it contains classname (remove "random" part after @)
            String v = o.toString();
            if (v.indexOf('@') != -1) { // non standard java object.
                s += "Object'   \t: "+prettyType(o);
            } else {
                // default stringifier...
                s += "'"+v+"'    \t: "+o.getClass().getName();
            }
View Full Code Here

Examples of java.sql.Ref

        assertNull(rs.getRef(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getRef("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        Ref ref = new SqlNullCheckedResultSetMockRef();
        rs2.setNullRef(ref);
        assertNotNull(rs.getRef(1));
        assertEquals(ref, rs.getRef(1));
        assertNotNull(rs.getRef("column"));
        assertEquals(ref, rs.getRef("column"));
View Full Code Here

Examples of java.sql.Ref

     * Tests the setNullRef implementation.
     */
    public void testSetNullRef() throws SQLException {
        assertNull(rs2.getNullRef());
        // Set what gets returned to something other than the default
        Ref ref = new SqlNullCheckedResultSetMockRef();
        rs2.setNullRef(ref);
        assertNotNull(rs.getRef(1));
        assertEquals(ref, rs.getRef(1));
        assertNotNull(rs.getRef("column"));
        assertEquals(ref, rs.getRef("column"));
View Full Code Here

Examples of net.sf.laja.parser.grammar.Ref

  public OmList getOmList() {
    return omList;
  }
   
  public GeneratorResult getGeneratorResult(ParsingSettings parsingSettings) {
    Ref ref = refList.getRef(grammarName);
    if (ref == null) {
      if (outputIsDefined) {
        writer.writeln("\n  Error. The variable \"" + grammarName + "\" must be declared.");
        return null;
      }
      // Add the definition manually.
      refList.add(getUppercaseGrammarName(), null, grammarName);
      ref = refList.getRef(grammarName);
    }

    boolean ok = true;

    // Fill in missing class names.
    outer:
    for (Outputmethod om : omList.getFullList()) {
      if (om.getClassName() == null) {
        for (Iterator i = refList.iterator(); i.hasNext();) {
          ref = (Ref) i.next();
          if (ref.getRefname().equals(om.getRefname())) {
            om.setClassDefinition(ref.getClassName());
            continue outer;
          }
        }
        writer.writeln("Error. Missing declaration for reference \"" + om.getRefname() + "\".");
        return null;
      }
    }

    for (Outputvar ov : ovSet.getSet()) {
      for (Iterator i = refList.iterator(); i.hasNext();) {
        ref = (Ref) i.next();
        if (ref.getRefname().equals(ov.getRef())) {
          ov.setClassName(ref.getClassName());
        }
      }
    }

    // ---
    // --- 2. Grammar definition.
    // ---
    GrammarData grammarData = new GrammarData(defList, omList, ovSet);
    omList.setData(refList, ovSet, outputList);
    ok = defList.generateGrammar(true, false, 1, grammarName, omList, ovSet, outputList, grammarData, new EmptyWriter(), parsingSettings, null);
    outputList.init();

    boolean ok2 = omList.initReferences(writer);
    if (ok) {
      ok = ok2;
    }

    StatementList statementList = new StatementList();
    defList.generateGrammar(false, false, 1, grammarName, omList, ovSet, outputList, grammarData, writer, parsingSettings, statementList);
    ok = defList.generateGrammar(false, false, 2, grammarName, omList, ovSet, outputList, grammarData, writer, parsingSettings, statementList);

    // ---
    // --- 4. Interfaces.
    // ---
    for (Iterator i = refList.iterator(); i.hasNext();) {
      ref = (Ref) i.next();

      Set<String> signatureSet = new HashSet<String>();
      for (Iterator j = omList.iterator(); j.hasNext();) {
        Outputmethod om = (Outputmethod)j.next();
        if (om.getClassName().equals(ref.getClassName())) {
          List<Omarg> omargList = om.getOmargList();
          String signature = om.getMethodSignature();

          if (signatureSet.contains(signature)) {
            writer.writeln("Error in row " + om.getRow() + ". Duplicate method signature:\n  " + om.getStatement());
            ok = false;
            break;
          }
          signatureSet.add(signature);
         
          ref.addOutputmethod(om);

          String name = om.getArgName();
          for (Omarg omarg : omargList) {
            if (omarg.getArg().equals(name)) {
              writer.writeln("Error in row " + om.getRow() + ". The variable names in the argument list must be unique:\n  " + om.getStatement());
              ok = false;
            }
          }
        }
      }
    }

    // TODO: L�gg in felmeddelande om class inte �r deklarerad.
    // Fill in missing class names.
    for (Iterator i = omList.iterator(); i.hasNext();) {
      Outputmethod om = (Outputmethod) i.next();
      if (om.getClassName() == null) {
        for (Iterator it = refList.iterator(); it.hasNext();) {
          ref = (Ref) it.next();
          if (ref.getRefname().equals(om.getRefname())) {
            om.setClass(ref.getClassName());
          }
        }
      }
    }

    // ---
    // --- 7. Output implementations.
    // ---
    List<Out> outList = new ArrayList<Out>();
    for (Output output : outputList.getList()) {
      for (int phase = 1; phase <= 2; phase++) {
        if (!output.isOutputClassUniqe(phase)) {
          continue;
        }
        List<Outputmethod> odlist = output.getList(phase);
        List<String> commentList = new ArrayList<String>();
        for (Outputmethod om : odlist) {
          if (output.isDefined()) {
            commentList.add(om.getStatement());
          }
        }
        Out out = new Out(phase, output.getClassName(phase), output.getArgClass(), commentList, output.isReceive(phase), output.isPushPop(phase));
        outList.add(out);
       
        output.writeSetStatement(phase, out);
      }
    }

    // ---
    // --- 8. Generate "variable" classes.
    // ---
    List<Varclass> varclassList = new ArrayList<Varclass>();
    for (Outputvar ov : ovSet.getSet()) {
      if (ref != null) {
        Varclass varclass = new Varclass(
            ov.isBoolean(),
            ov.getClassname(),
            ref.getClassName(),
            ov.getMethod());
        varclassList.add(varclass);
      }
    }
View Full Code Here

Examples of org.atomojo.sparql.Ref

      entryPivot = false;
      feedPivot = false;
      unsatisfiable = false;
      Triple lastBind = null;
      for (Triple t : triples) {
         Ref subject = t.getSubject();
         Ref predicate = t.getPredicate();
         Ref object = t.getObject();
         if (subject instanceof VariableRef && predicate instanceof TermRef && object instanceof NilRef) {
            String name = ((VariableRef)subject).getName();
            if (name.equals(var)) {
               URI term = ((TermRef)predicate).getTerm();
               if (term.equals(ENTRY_TERM)) {
View Full Code Here

Examples of org.eclipse.jgit.lib.Ref

      {
         ShellMessages.info(out, "Checking out plugin source files to [" + buildDir.getFullyQualifiedName()
                  + "] via 'git'");
         Git repo = GitUtils.clone(buildDir, gitRepo);

         Ref ref = null;
         String targetRef = refName;
         if (targetRef == null)
         {
            // Default to Forge runtime version if no Ref name is supplied.
            targetRef = environment.getRuntimeVersion();
         }

         if (targetRef != null)
         {
            // Try to find a Tag matching the given Ref name or runtime version
            Map<String, Ref> tags = repo.getRepository().getTags();
            ref = tags.get(targetRef);

            // Now try to find a matching Branch
            if (ref == null)
            {
               List<Ref> refs = GitUtils.getRemoteBranches(repo);
               for (Ref branchRef : refs)
               {
                  String branchName = branchRef.getName();
                  if (branchName != null && branchName.endsWith(targetRef))
                  {
                     ref = repo.branchCreate().setName(targetRef).setUpstreamMode(SetupUpstreamMode.TRACK)
                              .setStartPoint("origin/" + targetRef).call();
                  }
               }
            }

            // Now try to find a tag or branch with same Major.Minor.(x) version.
            if (ref == null)
            {
               // All
               List<String> sortedVersions = new ArrayList<String>();

               // Branches
               for (Ref branchRef : GitUtils.getRemoteBranches(repo))
               {
                  String branchName = branchRef.getName();
                  branchName = branchName.replaceFirst("refs/heads/", "");
                  if (InstalledPluginRegistry.isApiCompatible(targetRef, branchName))
                     sortedVersions.add(branchName);
               }

               // Tags

               // Branches
               for (String tag : tags.keySet())
               {
                  if (InstalledPluginRegistry.isApiCompatible(targetRef, tag))
                     sortedVersions.add(tag);
               }

               // Sort
               Collections.sort(sortedVersions);

               if (!sortedVersions.isEmpty())
               {
                  String version = sortedVersions.get(sortedVersions.size() - 1);
                  if (InstalledPluginRegistry.isApiCompatible(targetRef, version))
                  {
                     ref = tags.get(version);

                     if (ref == null)
                     {
                        ref = repo.branchCreate().setName(version).setUpstreamMode(SetupUpstreamMode.TRACK)
                                 .setStartPoint("origin/" + version).call();
                     }
                  }
               }
            }
         }

         if (ref == null)
         {
            ref = repo.getRepository().getRef("master");
         }

         if (ref != null)
         {
            ShellMessages.info(out, "Switching to branch/tag [" + ref.getName() + "]");
            GitUtils.checkout(repo, ref, false, SetupUpstreamMode.TRACK, false);
         }
         else if (refName != null)
         {
            throw new RuntimeException("Could not locate ref [" + targetRef + "] in repository ["
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.