org.simpleframework.xml.transform.Transform Java Examples

The following examples show how to use org.simpleframework.xml.transform.Transform. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LiteralTest.java    From simplexml with Apache License 2.0 4 votes vote down vote up
public Transform match(Class type) {
   if(type == Literal.class) {
      return new LiteralTransform();
   }
   return null;
}
 
Example #2
Source File: MatcherTest.java    From simplexml with Apache License 2.0 4 votes vote down vote up
public Transform match(Class type) throws Exception {
   if(type == Integer.class) {
      return this;
   }
   return null;
}
 
Example #3
Source File: MatcherTest.java    From simplexml with Apache License 2.0 4 votes vote down vote up
public Transform match(Class type) throws Exception {
   if(type == String.class) {
      return this;
   }
   return null;
}
 
Example #4
Source File: MatcherTest.java    From simplexml with Apache License 2.0 4 votes vote down vote up
public Transform match(Class type) throws Exception {
   if(type == MyEnum.class) {
      return this;
   }
   return null;
}
 
Example #5
Source File: TextConstructorInjectionWithTransformTest.java    From simplexml with Apache License 2.0 4 votes vote down vote up
public Transform match(Class type) throws Exception {
   if(type == DateTime.class) {
      return new DateTimeTransform();
   }
   return null;
}
 
Example #6
Source File: Support.java    From simplexml with Apache License 2.0 2 votes vote down vote up
/**
 * This is used to match a <code>Transform</code> using the type
 * specified. If no transform can be acquired then this returns
 * a null value indicating that no transform could be found.
 * 
 * @param type this is the type to acquire the transform for
 * 
 * @return returns a transform for processing the type given
 */ 
public Transform getTransform(Class type) throws Exception {
   return matcher.match(type);
}
 
Example #7
Source File: EmptyMatcher.java    From simplexml with Apache License 2.0 2 votes vote down vote up
/**
 * This method is used to return a null value for the transform.
 * Returning a null value allows the normal resolution of the
 * stock transforms to be used when no matcher is specified.
 * 
 * @param type this is the type that is expecting a transform
 * 
 * @return this transform will always return a null value
 */
public Transform match(Class type) throws Exception {
   return null;
}