Examples of type()


Examples of java.nio.file.FileStore.type()

    System.out.printf("Owner of file '%s' is '%s'\n", filePathRef.toFile().getName(), owner.getName());
    FileStore store = Files.getFileStore(filePathRef);
    System.out.println("Storage infos");
    System.out.printf(">>> Store name is '%s'\n", store.name());
    System.out.printf(">>> Store is read-only '%s'\n", store.isReadOnly());
    System.out.printf(">>> Store type is '%s'\n", store.type());
    String fileContentType = Files.probeContentType(filePathRef);
    System.out.printf("File '%s' content type is '%s'\n", f.getName(), fileContentType);
    List<String> content = Files.readAllLines(filePathRef, Charset.defaultCharset());
    System.out.printf("File '%s' content is '%s'\n", f.getName(), content);
    BasicFileAttributes basicAttributes = Files.readAttributes(filePathRef, BasicFileAttributes.class);
View Full Code Here

Examples of java.util.UUID.type()

                                return null;
                            }
                            // Add special case for creating null worlds.
                            // Not sure I like doing it this way, but this is a special case
                            if (arg.name().equalsIgnoreCase("nullworld")) {
                                return MockWorldFactory.makeNewNullMockWorld(arg.name(), arg.environment(), arg.type());
                            }
                            return MockWorldFactory.makeNewMockWorld(arg.name(), arg.environment(), arg.type());
                        }
                    });
View Full Code Here

Examples of javax.annotation.Resource.type()

   
    public static void addWebServiceContextInjections(Holder holder, ClassFinder finder) {       
        List<Field> fields = finder.findAnnotatedFields(Resource.class);
        for (Field field : fields) {
            Resource resource = (Resource) field.getAnnotation(Resource.class);
            Class type = getInjectionType(resource.type(), null, field);
            if (WebServiceContext.class == type) {
                holder.addInjection(field.getDeclaringClass().getName(),
                                    new Injection(field.getDeclaringClass().getName(), getInjectionName(null, field), ABSOLUTE_JNDI_NAME));
            }
        }
View Full Code Here

Examples of javax.persistence.PersistenceContext.type()

                {
                    return new PersistenceContextMetaEntry(
                                   currentParamClass,
                                   currentField.getName(),
                                   persistenceContext.unitName(),
                                   PersistenceContextType.EXTENDED.equals(persistenceContext.type()));
                }
            }
            currentParamClass = currentParamClass.getSuperclass();
        }
View Full Code Here

Examples of javax.resource.spi.ConfigProperty.type()

      cfgMeta.setName(getConfigPropertyName(annotation));

      if (configProperty.defaultValue() != null && !configProperty.defaultValue().equals(""))
         cfgMeta.setValue(configProperty.defaultValue());

      if (!Object.class.equals(configProperty.type()))
      {
         cfgMeta.setType(configProperty.type().getName());
      }
      else
      {
View Full Code Here

Examples of javax.validation.executable.ValidateOnExecution.type()

     * @param element element to be examined for {@link ValidateOnExecution}.
     * @return set of executable types or an empty set if the element is not annotated with {@link ValidateOnExecution}.
     */
    private Set<ExecutableType> getExecutableTypes(final AnnotatedElement element) {
        final ValidateOnExecution validateExecutable = element.getAnnotation(ValidateOnExecution.class);
        return validateExecutable != null ? Sets.newHashSet(validateExecutable.type()) : Collections.<ExecutableType>emptySet();
    }

    /**
     * Get a class hierarchy for the given {@code clazz} suitable to be looked for {@link ValidateOnExecution} annotation
     * in order according to the priority defined by Bean Validation spec (superclasses, interfaces).
View Full Code Here

Examples of javax.ws.rs.core.Response.ResponseBuilder.type()

        final JsonRepresentation bodyRepr = ex.getBody();
        final Throwable cause = ex.getCause();
        if (bodyRepr != null) {
            final String body = bodyRepr.toString();
            builder.entity(body);
            builder.type(MediaType.APPLICATION_JSON); // generic; the spec doesn't define what the media type should be
        } else if(cause == null) {
            builder.type(MediaType.APPLICATION_JSON); // generic; the spec doesn't define what the media type should be
        } else {
            String body;
            try {
View Full Code Here

Examples of javax.xml.bind.annotation.XmlElement.type()

                    && method.getParameterTypes().length == 1
                    && modifier.equals(method.getName())) {
                   
                    Class<?> clazz = method.getParameterTypes()[0];
                    if (method.getParameterTypes()[0].isPrimitive()) {
                        clazz = el.type();
                    }
                   
                    if (clazz.isAssignableFrom(part.getClass())) {
                        method.invoke(wrapperType, part);
                        setInvoked = true;
View Full Code Here

Examples of javax.xml.bind.annotation.XmlSchemaType.type()

      if (xmlSchemaType == null) {
        xmlSchemaType = _accessor.getPackageAnnotation(XmlSchemaType.class);

        if (xmlSchemaType != null) {
          if (XmlSchemaType.DEFAULT.class.equals(xmlSchemaType.type()))
            throw new JAXBException(L.l("@XmlSchemaType with name {0} on package {1} does not specify type", xmlSchemaType.name(), _accessor.getPackage().getName()));

          if (! _accessor.getType().equals(xmlSchemaType.type()))
            xmlSchemaType = null;
        }
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.type()

                av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/adapters/XmlJavaTypeAdapter;", true);
                XmlJavaTypeAdapter adapter = (XmlJavaTypeAdapter)ann;
                if (adapter.value() != null) {
                    av0.visit("value", org.objectweb.asm.Type.getType(getClassCode(adapter.value())));
                }
                if (adapter.type() != javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter.DEFAULT.class) {
                    av0.visit("type", org.objectweb.asm.Type.getType(getClassCode(adapter.type())));
                }
                av0.visitEnd();
            } else if (ann instanceof XmlAttachmentRef) {
                av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlAttachmentRef;", true);
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.