Java 类org.simpleframework.xml.stream.Verbosity 实例源码

项目:GitHub    文件:SimpleXmlConverterFactoryTest.java   
@Before public void setUp() {
  Format format = new Format(0, null, new HyphenStyle(), Verbosity.HIGH);
  Persister persister = new Persister(format);
  Retrofit retrofit = new Retrofit.Builder()
      .baseUrl(server.url("/"))
      .addConverterFactory(SimpleXmlConverterFactory.create(persister))
      .build();
  service = retrofit.create(Service.class);
}
项目:GitHub    文件:SimpleXmlConverterFactoryTest.java   
@Before public void setUp() {
  Format format = new Format(0, null, new HyphenStyle(), Verbosity.HIGH);
  Persister persister = new Persister(format);
  Retrofit retrofit = new Retrofit.Builder()
      .baseUrl(server.url("/"))
      .addConverterFactory(SimpleXmlConverterFactory.create(persister))
      .build();
  service = retrofit.create(Service.class);
}
项目:simplexml    文件:AnnotationFactory.java   
/**
 * This is used to determine whether the format for the current
 * serialization is verbose or not. The verbosity dictates the
 * type of default annotations that are generated for an object.
 * 
 * @return this is used to determine the verbosity to use
 */
private boolean isAttribute() {
   Verbosity verbosity = format.getVerbosity();

   if(verbosity != null) {
      return verbosity == LOW;
   }
   return false;
}
项目:simplexml    文件:NoAnnotationsRequiredTest.java   
public void testTypeVerbose() throws Exception {
   Format format = new Format(Verbosity.LOW);
   Persister persister = new Persister(format);
   PrimitiveEntry entry = new PrimitiveEntry();
   StringWriter writer = new StringWriter();

   persister.write(entry, writer);
   validate(persister, entry);
}
项目:jus    文件:SimpleXmlConverterFactoryTest.java   
@Before
public void setUp() {
    queue = Jus.newRequestQueue();
    Format format = new Format(0, null, new HyphenStyle(), Verbosity.HIGH);
    Persister persister = new Persister(format);
    RetroProxy retroProxy = new RetroProxy.Builder()
            .baseUrl(server.url("/").toString())
            .addConverterFactory(SimpleXmlConverterFactory.create(persister))
            .requestQueue(queue)
            .build();
    service = retroProxy.create(Service.class);
}
项目:simple-xml    文件:AnnotationFactory.java   
/**
 * This is used to determine whether the format for the current
 * serialization is verbose or not. The verbosity dictates the
 * type of default annotations that are generated for an object.
 * 
 * @return this is used to determine the verbosity to use
 */
private boolean isAttribute() {
   Verbosity verbosity = format.getVerbosity();

   if(verbosity != null) {
      return verbosity == LOW;
   }
   return false;
}
项目:simple-xml    文件:NoAnnotationsRequiredTest.java   
public void testTypeVerbose() throws Exception {
   Format format = new Format(Verbosity.LOW);
   Persister persister = new Persister(format);
   PrimitiveEntry entry = new PrimitiveEntry();
   StringWriter writer = new StringWriter();

   persister.write(entry, writer);
   validate(persister, entry);
}
项目:retrofit-jaxrs    文件:SimpleXMLConverterTest.java   
private static Converter initConverter()
{
  Format format = new Format(0, null, new HyphenStyle(), Verbosity.HIGH);
  Persister persister = new Persister(format);
  return new SimpleXMLConverter(persister);
}