Examples of Class


Examples of org.objectweb.jorm.metainfo.api.Class

    protected PNameField extent(String classname, String alias) throws SpeedoException, MedorException {
        if (classname == null) {
            throw new NullPointerException("class name not defined");
        }
        Class theClass = jmiManager.getClass(classname);
        if (theClass == null) {
            throw new SpeedoException
                ("Class '" + classname +
                 "' has not been declared in the jorm meta information");
        }
View Full Code Here

Examples of org.objectweb.jorm.metainfo.api.Class

    private GenClassMapping getGenClassMapping(GenClassRef gcr, Class clazz)
            throws SpeedoException {
        String gcid = gcr.getGenClassId();
        GenClassMapping gcm = getMapping(clazz).getGenClassMapping(gcid);
        if (gcm == null) {
            Class klass = clazz;
            Collection superclasses = klass.getSuperClasses();
            while (gcm == null && !superclasses.isEmpty()) {
                klass = (Class) superclasses.iterator().next();
                gcm = getMapping(klass).getGenClassMapping(gcid);
                superclasses = klass.getSuperClasses();
            }
        }
        if (gcm == null) {
            throw new SpeedoException("No GenClassMapping found for the field "
                    + gcid);
View Full Code Here

Examples of org.objectweb.jorm.metainfo.api.Class

            throws SpeedoException {
        String rid = cr.getName();
        ReferenceMapping rm = getMapping(clazz).getClassMapping()
                .getReferenceMapping(rid);
        if (rm == null) {
            Class klass = clazz;
            Collection superclasses = klass.getSuperClasses();
            while (rm == null && !superclasses.isEmpty()) {
                klass = (Class) superclasses.iterator().next();
                rm = getMapping(klass).getClassMapping().getReferenceMapping(
                        rid);
                superclasses = klass.getSuperClasses();
            }
        }
        if (rm == null) {
            throw new SpeedoException(
                    "No ReferenceMapping found for the field " + rid);
View Full Code Here

Examples of org.perl6.metamodel.Class

        cattrs.add("$.foo");
        cls.put("attrs", cattrs);
       
        options.put("class", cls);

        foo = new Class("Foo", options);
    }
View Full Code Here

Examples of org.rascalmpl.ast.Class

   
    if (symbol.isCaseInsensitiveLiteral()) {
      return factory.constructor(Factory.Symbol_CiLit, ciliteral2Symbol(symbol.getCistring()));
    }
    if (symbol.isCharacterClass()) {
      Class cc = symbol.getCharClass();
      return charclass2Symbol(cc);
    }
    if (symbol.isIter()) {
      if (lex) {
        return factory.constructor(Factory.Symbol_IterPlus, symbolAST2SymbolConstructor(symbol.getSymbol(), lex, layout));
View Full Code Here

Examples of org.xrace.desjardins.trx.Class

    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Class target = (Class) object;
        return target.getContent();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Class target = (Class) object;
          target.setContent((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    addFieldDescriptor(desc);

    //-- validation code for: _content
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { //-- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    //-- initialize attribute descriptors

    //-- _name
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        java.lang.String.class, "_name", "name",
        org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Class target = (Class) object;
        return target.getName();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Class target = (Class) object;
          target.setName((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    //-- validation code for: _name
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { //-- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    //-- _action
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.trx.types.ClassActionType.class,
        "_action", "action", org.exolab.castor.xml.NodeType.Attribute);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Class target = (Class) object;
        return target.getAction();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Class target = (Class) object;
          target
              .setAction((org.xrace.desjardins.trx.types.ClassActionType) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
        org.xrace.desjardins.trx.types.ClassActionType.class, handler);
    desc.setImmutable(true);
    desc.setSchemaType("ClassActionType");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    //-- validation code for: _action
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { //-- local scope
    }
    desc.setValidator(fieldValidator);
    //-- _key
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        java.lang.String.class, "_key", "key",
        org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Class target = (Class) object;
        return target.getKey();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Class target = (Class) object;
          target.setKey((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
View Full Code Here

Examples of ru.kai.assistantschedule.core.calendar.Class

    @Override
    protected Class[] getInput() {
  Class[] elements = new Class[10];
  for (int i = 0; i < 10; i++) {
      elements[i] = new Class(Time.at08_00, "lectureRoom_" + i,
        "discipline_" + i, LessonType.LEC, "group_" + i,
        "professor_" + i, "department_" + i);
  }

  return elements;
View Full Code Here

Examples of ru.kai.assistantschedule.core.calendar.Class

  }

  @Override
  public String getColumnText(Object element, int columnIndex) {
    // Выводим данные в колонках
    Class classRow = (Class) element;
   
    switch (columnIndex) {
      case 0:
        return classRow.group;
      case 1:
View Full Code Here

Examples of tree.type.Class

            {
                // Haxe.g:389:24: ^( IDENTIFIER ( topLevelAccessAttr )? ( typeParam )? ( extending )? ( implementList )? classBodyScope )
                {
                Object root_1 = (Object)adaptor.nil();
                root_1 = (Object)adaptor.becomeRoot(
                new Class(stream_IDENTIFIER.nextToken())
                , root_1);

                // Haxe.g:389:44: ( topLevelAccessAttr )?
                if ( stream_topLevelAccessAttr.hasNext() ) {
                    adaptor.addChild(root_1, stream_topLevelAccessAttr.nextTree());
View Full Code Here

Examples of tree.type.Class

        Environment env = (Environment)local;
        HaxeType thisType = (HaxeType)env.get("this");
        // only classes can have type params
        if (thisType instanceof Class)
        {
            Class cclass = (Class)thisType;
            // 1. search in current class type params
            for (HaxeType type : cclass.getParameterTypes())
            {
                if (type.getText().equals(shortTypeName))
                {
                    return type;
                }
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.