Beispiel #1
0
 /**
  * Creates a QualifiedName from the external string format of QualifiedName.
  *
  * <p>This factory method is the reverse of {@link QualifiedName#toString() } method, and creates
  * a new QualifiedName instance from the string representation of the QualifiedName.
  *
  * @param fullQualifiedName The QualifiedName external string representation to be converted back
  *     into a QualifiedName instance.
  * @return The QualifiedName instance represented by the {@code qualifiedName} argument.
  * @throws IllegalArgumentException If the {@code qualifiedName} argument has wrong format.
  */
 public static QualifiedName fromFQN(String fullQualifiedName) {
   NullArgumentException.validateNotEmpty("qualifiedName", fullQualifiedName);
   int idx = fullQualifiedName.lastIndexOf(":");
   if (idx == -1) {
     throw new IllegalArgumentException(
         "Name '" + fullQualifiedName + "' is not a qualified name");
   }
   final String type = fullQualifiedName.substring(0, idx);
   final String name = fullQualifiedName.substring(idx + 1);
   return new QualifiedName(TypeName.nameOf(type), name);
 }
Beispiel #2
0
 /**
  * Creates a QualifiedName from a method.
  *
  * <p>This factory method will create a QualifiedName from the Method itself.
  *
  * @param method Type method that returns a Property, for which the QualifiedName will be
  *     representing.
  * @return A QualifiedName representing this method.
  * @throws NullArgumentException If the {@code method} argument passed is null.
  */
 public static QualifiedName fromAccessor(AccessibleObject method) {
   NullArgumentException.validateNotNull("method", method);
   return fromClass(((Member) method).getDeclaringClass(), ((Member) method).getName());
 }
Beispiel #3
0
 QualifiedName(TypeName typeName, String name) {
   NullArgumentException.validateNotNull("typeName", typeName);
   NullArgumentException.validateNotEmpty("name", name);
   this.typeName = typeName;
   this.name = name;
 }
 public DataSourceAssembler withCircuitBreaker(CircuitBreaker circuitBreaker) {
   NullArgumentException.validateNotNull("CircuitBreaker", circuitBreaker);
   this.circuitBreaker = circuitBreaker;
   return this;
 }
 public DataSourceAssembler withDataSourceServiceIdentity(String dataSourceServiceId) {
   NullArgumentException.validateNotNull("DataSourceService identity", dataSourceServiceId);
   this.dataSourceServiceId = dataSourceServiceId;
   return this;
 }