Examples of SimpleType


Examples of javax.management.openmbean.SimpleType

         oos.writeObject(types[i]);
   
         // Deserialize it
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStream ois = new ObjectInputStream(bais);
         SimpleType result = (SimpleType) ois.readObject();

         assertTrue("Should resolve to same object after serialization " + types[i], types[i] == result);
      }
   }
View Full Code Here

Examples of net.sf.saxon.type.SimpleType

      // we may need to change the namespace prefix if the one we chose is
      // already in use with a different namespace URI: this is done behind the scenes
      // by the ComplexContentOutputter

        //CharSequence value = expandChildren(context).toString();
        SimpleType schemaType = getSchemaType();
        int validationAction = getValidationAction();
        if (schemaType != null) {
            // test whether the value actually conforms to the given type
            try {
                ValidationFailure err = schemaType.validateContent(
                        value, DummyNamespaceResolver.getInstance(), context.getConfiguration().getNameChecker());
                if (err != null) {
                    ValidationException ve = new ValidationException(
                            "Attribute value " + Err.wrap(value, Err.VALUE) +
                                               " does not match the required type " +
                                               schemaType.getDescription() + ". " +
                                               err.getMessage());
                    ve.setErrorCode("XTTE1540");
                    throw ve;
                }
            } catch (UnresolvedReferenceException ure) {
View Full Code Here

Examples of org.chromattic.core.bean.SimpleType

          jcrValue = null;
        }

        //
        if (jcrValue != null) {
          SimpleType st = type != null ? type.getSimpleType() : null;
          value = ValueMapper.instance.get(jcrValue, st);

          //
          if (propertyCache != null) {
            if (value instanceof InputStream) {
View Full Code Here

Examples of org.chromattic.core.bean.SimpleType

      //
      Value jcrValue;
      if (propertyValue != null) {
        ValueFactory valueFactory = session.getJCRSession().getValueFactory();
        SimpleType st = type != null ? type.getSimpleType() : null;
        jcrValue = ValueMapper.instance.get(valueFactory, propertyValue, st);
      } else {
        jcrValue = null;
      }
View Full Code Here

Examples of org.chromattic.core.bean.SimpleType

    if (objects == null) {
      throw new NullPointerException();
    }
    try {
      ValueFactory valueFactory = session.getJCRSession().getValueFactory();
      SimpleType st = type != null ? type.getSimpleType() : null;
      Value[] values;
      if (listType == ListType.LIST) {
        List<?> list = (List<?>)objects;
        values = new Value[list.size()];
        int i = 0;
View Full Code Here

Examples of org.chromattic.core.bean.SimpleType

          SingleValuedPropertyInfo svpi = (SingleValuedPropertyInfo)propertyInfo;
          ValueInfo vi = svpi.getValue();
          if (vi instanceof SimpleValueInfo) {
            SimpleValueInfo svi = (SimpleValueInfo)vi;
            JCRNodeAttributeMapping memberMapping = new JCRNodeAttributeMapping(nat);
            SimpleType simpleType = svi.getSimpleType();
            if (nat == NodeAttributeType.PATH) {
              if (simpleType != SimpleType.PATH) {
                throw new IllegalStateException("Type " + simpleType + " is not accepted for path attribute mapping");
              }
            } else {
View Full Code Here

Examples of org.codehaus.janino.Java.SimpleType

                for (Iterator it = l.iterator(); it.hasNext();) {
                    Object o = it.next();
                    if (o instanceof IField) {
                        FieldAccess fieldAccess = new FieldAccess(
                            location,
                            new SimpleType(location, ((IField) o).getDeclaringIClass()),
                            (IField) o
                        );
                        fieldAccess.setEnclosingBlockStatement(enclosingBlockStatement);
                        return fieldAccess;
                    }
                }
            }
        }

        // JLS3 6.5.2.BL1.B1.B2.2 Static field imported through static-import-on-demand.
        {
            IField importedField = null;
            for (Iterator it = this.staticImportsOnDemand.iterator(); it.hasNext();) {
                IClass iClass = (IClass) it.next();
                IField f = iClass.getDeclaredIField(identifier);
                if (f != null) {
                        // JLS3 7.5.4 Static-Import-on-Demand Declaration
                        if (!UnitCompiler.this.isAccessible(f, enclosingBlockStatement)) continue;

                        if (importedField != null) {
                            UnitCompiler.this.compileError(
                                "Ambiguous static field import: \""
                                + importedField.toString()
                                + "\" vs. \""
                                + f.toString()
                                + "\""
                            );
                        }
                        importedField = f;
                    }
                }
            if (importedField != null) {
                if (!importedField.isStatic()) UnitCompiler.this.compileError("Cannot static-import non-static field");
                FieldAccess fieldAccess = new FieldAccess(
                    location,
                    new SimpleType(location, importedField.getDeclaringIClass()),
                    importedField
                );
                fieldAccess.setEnclosingBlockStatement(enclosingBlockStatement);
                return fieldAccess;
            }
        }

        // Hack: "java" MUST be a package, not a class.
        if (identifier.equals("java")) return new Java.Package(location, identifier);

        // 6.5.2.BL1.B1.B2.1 (JLS3: 6.5.2.BL1.B1.B3.2) Local class.
        {
            Java.LocalClassDeclaration lcd = this.findLocalClassDeclaration(scope, identifier);
            if (lcd != null) return new Java.SimpleType(location, this.resolve(lcd));
        }

        // 6.5.2.BL1.B1.B2.2 (JLS3: 6.5.2.BL1.B1.B3.3) Member type.
        if (scopeTypeDeclaration != null) {
            IClass memberType = this.findMemberType(
                UnitCompiler.this.resolve(scopeTypeDeclaration),
                identifier,
                location
            );
            if (memberType != null) return new Java.SimpleType(location, memberType);
        }

        // 6.5.2.BL1.B1.B3.1 (JLS3: 6.5.2.BL1.B1.B4.1) Single type import.
        {
            IClass iClass = this.importSingleType(identifier, location);
            if (iClass != null) return new Java.SimpleType(location, iClass);
        }

        // 6.5.2.BL1.B1.B3.2 (JLS3: 6.5.2.BL1.B1.B3.1) Package member class/interface declared in this compilation unit.
        // Notice that JLS2 looks this up AFTER local class, member type, single type import, while
        // JLS3 looks this up BEFORE local class, member type, single type import.
        {
            Java.PackageMemberTypeDeclaration pmtd = scopeCompilationUnit.getPackageMemberTypeDeclaration(identifier);
            if (pmtd != null) return new Java.SimpleType(location, this.resolve((Java.AbstractTypeDeclaration) pmtd));
        }

        // 6.5.2.BL1.B1.B4 Class or interface declared in same package.
        // Notice: Why is this missing in JLS3?
        {
            String className = (
                scopeCompilationUnit.optionalPackageDeclaration == null ?
                identifier :
                scopeCompilationUnit.optionalPackageDeclaration.packageName + '.' + identifier
            );
            IClass result = findClassByName(location, className);
            if (result != null) return new Java.SimpleType(location, result);
        }

        // 6.5.2.BL1.B1.B5 (JLS3: 6.5.2.BL1.B1.B4.2), 6.5.2.BL1.B1.B6 Type-import-on-demand.
        {
            IClass importedClass = this.importTypeOnDemand(identifier, location);
            if (importedClass != null) {
                return new Java.SimpleType(location, importedClass);
            }
        }

        // JLS3 6.5.2.BL1.B1.B4.3 Type imported through single static import.
        {
            List l = (List) this.singleStaticImports.get(identifier);
            if (l != null) {
                for (Iterator it = l.iterator(); it.hasNext();) {
                    Object o = it.next();
                    if (o instanceof IClass) return new SimpleType(null, (IClass) o);
                }
            }
        }

        // JLS3 6.5.2.BL1.B1.B4.4 Type imported through static-import-on-demand.
View Full Code Here

Examples of org.eclipse.dltk.evaluation.types.SimpleType

            .getPhpVersion(methodContext.getSourceModule()
                .getScriptProject().getProject());
        if (lambdas[0] != null
            && (lambdas[0].isStatic() || phpVersion
                .isLessThan(PHPVersion.PHP5_4))) {
          this.results.add(new SimpleType(SimpleType.TYPE_NULL));
        } else {
          IEvaluatedType instanceType = methodContext
              .getInstanceType();
          if (instanceType != null) {
            this.results.add(instanceType);
          } else {
            this.results.add(new SimpleType(SimpleType.TYPE_NULL));
          }
        }
        return IGoal.NO_GOALS;
      }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.SimpleType

  private void setClassInformation(JClass cls, TypeDeclaration object) {

    cls.setIsInterface(object.isInterface());
    cls.setClassName(object.getName().getIdentifier());

    SimpleType _superClass = (SimpleType) object.getSuperclassType();
    if (_superClass != null) {
      cls.setSuperClass(_superClass.getName().getFullyQualifiedName());
    }

    List interfaceLst = object.superInterfaceTypes();

    ListIterator interfaces = interfaceLst.listIterator();
    while (interfaces.hasNext()) {
      {
        SimpleType sin = (SimpleType) interfaces.next();
        cls.getInterfaces().add(sin.toString());
      }

    }
    addMethods(cls, object);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.SimpleType

    private Name findName(Type t)
    {
        if (t.isSimpleType())
        {
            SimpleType st = (SimpleType) t;
            return st.getName();
        }
        else if (t.isArrayType())
        {
            ArrayType at = (ArrayType) t;
            return findName(at.getElementType());
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.