equal
deleted
inserted
replaced
125 * |
125 * |
126 * @param q1 A query expression. |
126 * @param q1 A query expression. |
127 * @param q2 Another query expression. |
127 * @param q2 Another query expression. |
128 * |
128 * |
129 * @return The conjunction of the two arguments. The returned object |
129 * @return The conjunction of the two arguments. The returned object |
130 * will be serialized as an instance of the non-public class {@link |
130 * will be serialized as an instance of the non-public class |
131 * <a href="../../serialized-form.html#javax.management.AndQueryExp"> |
131 * <a href="../../serialized-form.html#javax.management.AndQueryExp"> |
132 * javax.management.AndQueryExp</a>}. |
132 * javax.management.AndQueryExp</a>. |
133 */ |
133 */ |
134 public static QueryExp and(QueryExp q1, QueryExp q2) { |
134 public static QueryExp and(QueryExp q1, QueryExp q2) { |
135 return new AndQueryExp(q1, q2); |
135 return new AndQueryExp(q1, q2); |
136 } |
136 } |
137 |
137 |
141 * |
141 * |
142 * @param q1 A query expression. |
142 * @param q1 A query expression. |
143 * @param q2 Another query expression. |
143 * @param q2 Another query expression. |
144 * |
144 * |
145 * @return The disjunction of the two arguments. The returned object |
145 * @return The disjunction of the two arguments. The returned object |
146 * will be serialized as an instance of the non-public class {@link |
146 * will be serialized as an instance of the non-public class |
147 * <a href="../../serialized-form.html#javax.management.OrQueryExp"> |
147 * <a href="../../serialized-form.html#javax.management.OrQueryExp"> |
148 * javax.management.OrQueryExp</a>}. |
148 * javax.management.OrQueryExp</a>. |
149 */ |
149 */ |
150 public static QueryExp or(QueryExp q1, QueryExp q2) { |
150 public static QueryExp or(QueryExp q1, QueryExp q2) { |
151 return new OrQueryExp(q1, q2); |
151 return new OrQueryExp(q1, q2); |
152 } |
152 } |
153 |
153 |
158 * @param v1 A value expression. |
158 * @param v1 A value expression. |
159 * @param v2 Another value expression. |
159 * @param v2 Another value expression. |
160 * |
160 * |
161 * @return A "greater than" constraint on the arguments. The |
161 * @return A "greater than" constraint on the arguments. The |
162 * returned object will be serialized as an instance of the |
162 * returned object will be serialized as an instance of the |
163 * non-public class {@link <a |
163 * non-public class |
164 * href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
164 * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
165 * javax.management.BinaryRelQueryExp</a>} with a {@code relOp} equal |
165 * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal |
166 * to {@link #GT}. |
166 * to {@link #GT}. |
167 */ |
167 */ |
168 public static QueryExp gt(ValueExp v1, ValueExp v2) { |
168 public static QueryExp gt(ValueExp v1, ValueExp v2) { |
169 return new BinaryRelQueryExp(GT, v1, v2); |
169 return new BinaryRelQueryExp(GT, v1, v2); |
170 } |
170 } |
176 * @param v1 A value expression. |
176 * @param v1 A value expression. |
177 * @param v2 Another value expression. |
177 * @param v2 Another value expression. |
178 * |
178 * |
179 * @return A "greater than or equal to" constraint on the |
179 * @return A "greater than or equal to" constraint on the |
180 * arguments. The returned object will be serialized as an |
180 * arguments. The returned object will be serialized as an |
181 * instance of the non-public class {@link <a |
181 * instance of the non-public class |
182 * href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
182 * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
183 * javax.management.BinaryRelQueryExp</a>} with a {@code relOp} equal |
183 * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal |
184 * to {@link #GE}. |
184 * to {@link #GE}. |
185 */ |
185 */ |
186 public static QueryExp geq(ValueExp v1, ValueExp v2) { |
186 public static QueryExp geq(ValueExp v1, ValueExp v2) { |
187 return new BinaryRelQueryExp(GE, v1, v2); |
187 return new BinaryRelQueryExp(GE, v1, v2); |
188 } |
188 } |
194 * @param v1 A value expression. |
194 * @param v1 A value expression. |
195 * @param v2 Another value expression. |
195 * @param v2 Another value expression. |
196 * |
196 * |
197 * @return A "less than or equal to" constraint on the arguments. |
197 * @return A "less than or equal to" constraint on the arguments. |
198 * The returned object will be serialized as an instance of the |
198 * The returned object will be serialized as an instance of the |
199 * non-public class {@link <a |
199 * non-public class |
200 * href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
200 * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
201 * javax.management.BinaryRelQueryExp</a>} with a {@code relOp} equal |
201 * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal |
202 * to {@link #LE}. |
202 * to {@link #LE}. |
203 */ |
203 */ |
204 public static QueryExp leq(ValueExp v1, ValueExp v2) { |
204 public static QueryExp leq(ValueExp v1, ValueExp v2) { |
205 return new BinaryRelQueryExp(LE, v1, v2); |
205 return new BinaryRelQueryExp(LE, v1, v2); |
206 } |
206 } |
212 * @param v1 A value expression. |
212 * @param v1 A value expression. |
213 * @param v2 Another value expression. |
213 * @param v2 Another value expression. |
214 * |
214 * |
215 * @return A "less than" constraint on the arguments. The |
215 * @return A "less than" constraint on the arguments. The |
216 * returned object will be serialized as an instance of the |
216 * returned object will be serialized as an instance of the |
217 * non-public class {@link <a |
217 * non-public class |
218 * href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
218 * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
219 * javax.management.BinaryRelQueryExp</a>} with a {@code relOp} equal |
219 * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal |
220 * to {@link #LT}. |
220 * to {@link #LT}. |
221 */ |
221 */ |
222 public static QueryExp lt(ValueExp v1, ValueExp v2) { |
222 public static QueryExp lt(ValueExp v1, ValueExp v2) { |
223 return new BinaryRelQueryExp(LT, v1, v2); |
223 return new BinaryRelQueryExp(LT, v1, v2); |
224 } |
224 } |
230 * @param v1 A value expression. |
230 * @param v1 A value expression. |
231 * @param v2 Another value expression. |
231 * @param v2 Another value expression. |
232 * |
232 * |
233 * @return A "equal to" constraint on the arguments. The |
233 * @return A "equal to" constraint on the arguments. The |
234 * returned object will be serialized as an instance of the |
234 * returned object will be serialized as an instance of the |
235 * non-public class {@link <a |
235 * non-public class |
236 * href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
236 * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp"> |
237 * javax.management.BinaryRelQueryExp</a>} with a {@code relOp} equal |
237 * javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal |
238 * to {@link #EQ}. |
238 * to {@link #EQ}. |
239 */ |
239 */ |
240 public static QueryExp eq(ValueExp v1, ValueExp v2) { |
240 public static QueryExp eq(ValueExp v1, ValueExp v2) { |
241 return new BinaryRelQueryExp(EQ, v1, v2); |
241 return new BinaryRelQueryExp(EQ, v1, v2); |
242 } |
242 } |
249 * @param v2 Value expression that represents a boundary of the constraint. |
249 * @param v2 Value expression that represents a boundary of the constraint. |
250 * @param v3 Value expression that represents a boundary of the constraint. |
250 * @param v3 Value expression that represents a boundary of the constraint. |
251 * |
251 * |
252 * @return The constraint that v1 lies between v2 and v3. The |
252 * @return The constraint that v1 lies between v2 and v3. The |
253 * returned object will be serialized as an instance of the |
253 * returned object will be serialized as an instance of the |
254 * non-public class {@link <a |
254 * non-public class |
255 * href="../../serialized-form.html#javax.management.BetweenQueryExp"> |
255 * <a href="../../serialized-form.html#javax.management.BetweenQueryExp"> |
256 * javax.management.BetweenQueryExp</a>}. |
256 * javax.management.BetweenQueryExp</a>. |
257 */ |
257 */ |
258 public static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3) { |
258 public static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3) { |
259 return new BetweenQueryExp(v1, v2, v3); |
259 return new BetweenQueryExp(v1, v2, v3); |
260 } |
260 } |
261 |
261 |
277 * @param a An attribute expression |
277 * @param a An attribute expression |
278 * @param s A string value expression representing a matching constraint |
278 * @param s A string value expression representing a matching constraint |
279 * |
279 * |
280 * @return A query expression that represents the matching |
280 * @return A query expression that represents the matching |
281 * constraint on the string argument. The returned object will |
281 * constraint on the string argument. The returned object will |
282 * be serialized as an instance of the non-public class {@link <a |
282 * be serialized as an instance of the non-public class |
283 * href="../../serialized-form.html#javax.management.MatchQueryExp"> |
283 * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> |
284 * javax.management.MatchQueryExp</a>}. |
284 * javax.management.MatchQueryExp</a>. |
285 */ |
285 */ |
286 public static QueryExp match(AttributeValueExp a, StringValueExp s) { |
286 public static QueryExp match(AttributeValueExp a, StringValueExp s) { |
287 return new MatchQueryExp(a, s); |
287 return new MatchQueryExp(a, s); |
288 } |
288 } |
289 |
289 |
317 * @param className The name of the class possessing the attribute. |
317 * @param className The name of the class possessing the attribute. |
318 * @param name The name of the attribute. |
318 * @param name The name of the attribute. |
319 * |
319 * |
320 * @return An attribute expression for the attribute named name. |
320 * @return An attribute expression for the attribute named name. |
321 * The returned object will be serialized as an instance of the |
321 * The returned object will be serialized as an instance of the |
322 * non-public class {@link <a |
322 * non-public class |
323 * href="../../serialized-form.html#javax.management.QualifiedAttributeValueExp"> |
323 * <a href="../../serialized-form.html#javax.management.QualifiedAttributeValueExp"> |
324 * javax.management.QualifiedAttributeValueExp</a>}. |
324 * javax.management.QualifiedAttributeValueExp</a>. |
325 */ |
325 */ |
326 public static AttributeValueExp attr(String className, String name) { |
326 public static AttributeValueExp attr(String className, String name) { |
327 return new QualifiedAttributeValueExp(className, name); |
327 return new QualifiedAttributeValueExp(className, name); |
328 } |
328 } |
329 |
329 |
336 * MBeanServer#getObjectInstance |
336 * MBeanServer#getObjectInstance |
337 * MBeanServer.getObjectInstance(objectName)}.</p> |
337 * MBeanServer.getObjectInstance(objectName)}.</p> |
338 * |
338 * |
339 * @return A class attribute expression. The returned object |
339 * @return A class attribute expression. The returned object |
340 * will be serialized as an instance of the non-public class |
340 * will be serialized as an instance of the non-public class |
341 * {@link <a |
341 * <a href="../../serialized-form.html#javax.management.ClassAttributeValueExp"> |
342 * href="../../serialized-form.html#javax.management.ClassAttributeValueExp"> |
342 * javax.management.ClassAttributeValueExp</a>. |
343 * javax.management.ClassAttributeValueExp</a>}. |
|
344 */ |
343 */ |
345 public static AttributeValueExp classattr() { |
344 public static AttributeValueExp classattr() { |
346 return new ClassAttributeValueExp(); |
345 return new ClassAttributeValueExp(); |
347 } |
346 } |
348 |
347 |
350 * Returns a constraint that is the negation of its argument. |
349 * Returns a constraint that is the negation of its argument. |
351 * |
350 * |
352 * @param queryExp The constraint to negate. |
351 * @param queryExp The constraint to negate. |
353 * |
352 * |
354 * @return A negated constraint. The returned object will be |
353 * @return A negated constraint. The returned object will be |
355 * serialized as an instance of the non-public class {@link <a |
354 * serialized as an instance of the non-public class |
356 * href="../../serialized-form.html#javax.management.NotQueryExp"> |
355 * <a href="../../serialized-form.html#javax.management.NotQueryExp"> |
357 * javax.management.NotQueryExp</a>}. |
356 * javax.management.NotQueryExp</a>. |
358 */ |
357 */ |
359 public static QueryExp not(QueryExp queryExp) { |
358 public static QueryExp not(QueryExp queryExp) { |
360 return new NotQueryExp(queryExp); |
359 return new NotQueryExp(queryExp); |
361 } |
360 } |
362 |
361 |
366 * @param val A value to be constrained. |
365 * @param val A value to be constrained. |
367 * @param valueList An array of ValueExps. |
366 * @param valueList An array of ValueExps. |
368 * |
367 * |
369 * @return A QueryExp that represents the constraint. The |
368 * @return A QueryExp that represents the constraint. The |
370 * returned object will be serialized as an instance of the |
369 * returned object will be serialized as an instance of the |
371 * non-public class {@link <a |
370 * non-public class |
372 * href="../../serialized-form.html#javax.management.InQueryExp"> |
371 * <a href="../../serialized-form.html#javax.management.InQueryExp"> |
373 * javax.management.InQueryExp</a>}. |
372 * javax.management.InQueryExp</a>. |
374 */ |
373 */ |
375 public static QueryExp in(ValueExp val, ValueExp valueList[]) { |
374 public static QueryExp in(ValueExp val, ValueExp valueList[]) { |
376 return new InQueryExp(val, valueList); |
375 return new InQueryExp(val, valueList); |
377 } |
376 } |
378 |
377 |
393 * |
392 * |
394 * @param val An instance of Number. |
393 * @param val An instance of Number. |
395 * |
394 * |
396 * @return A ValueExp object containing the argument. The |
395 * @return A ValueExp object containing the argument. The |
397 * returned object will be serialized as an instance of the |
396 * returned object will be serialized as an instance of the |
398 * non-public class {@link <a |
397 * non-public class |
399 * href="../../serialized-form.html#javax.management.NumericValueExp"> |
398 * <a href="../../serialized-form.html#javax.management.NumericValueExp"> |
400 * javax.management.NumericValueExp</a>}. |
399 * javax.management.NumericValueExp</a>. |
401 */ |
400 */ |
402 public static ValueExp value(Number val) { |
401 public static ValueExp value(Number val) { |
403 return new NumericValueExp(val); |
402 return new NumericValueExp(val); |
404 } |
403 } |
405 |
404 |
409 * |
408 * |
410 * @param val An int value. |
409 * @param val An int value. |
411 * |
410 * |
412 * @return A ValueExp object containing the argument. The |
411 * @return A ValueExp object containing the argument. The |
413 * returned object will be serialized as an instance of the |
412 * returned object will be serialized as an instance of the |
414 * non-public class {@link <a |
413 * non-public class |
415 * href="../../serialized-form.html#javax.management.NumericValueExp"> |
414 * <a href="../../serialized-form.html#javax.management.NumericValueExp"> |
416 * javax.management.NumericValueExp</a>}. |
415 * javax.management.NumericValueExp</a>. |
417 */ |
416 */ |
418 public static ValueExp value(int val) { |
417 public static ValueExp value(int val) { |
419 return new NumericValueExp((long) val); |
418 return new NumericValueExp((long) val); |
420 } |
419 } |
421 |
420 |
425 * |
424 * |
426 * @param val A long value. |
425 * @param val A long value. |
427 * |
426 * |
428 * @return A ValueExp object containing the argument. The |
427 * @return A ValueExp object containing the argument. The |
429 * returned object will be serialized as an instance of the |
428 * returned object will be serialized as an instance of the |
430 * non-public class {@link <a |
429 * non-public class |
431 * href="../../serialized-form.html#javax.management.NumericValueExp"> |
430 * <a href="../../serialized-form.html#javax.management.NumericValueExp"> |
432 * javax.management.NumericValueExp</a>}. |
431 * javax.management.NumericValueExp</a>. |
433 */ |
432 */ |
434 public static ValueExp value(long val) { |
433 public static ValueExp value(long val) { |
435 return new NumericValueExp(val); |
434 return new NumericValueExp(val); |
436 } |
435 } |
437 |
436 |
441 * |
440 * |
442 * @param val A float value. |
441 * @param val A float value. |
443 * |
442 * |
444 * @return A ValueExp object containing the argument. The |
443 * @return A ValueExp object containing the argument. The |
445 * returned object will be serialized as an instance of the |
444 * returned object will be serialized as an instance of the |
446 * non-public class {@link <a |
445 * non-public class |
447 * href="../../serialized-form.html#javax.management.NumericValueExp"> |
446 * <a href="../../serialized-form.html#javax.management.NumericValueExp"> |
448 * javax.management.NumericValueExp</a>}. |
447 * javax.management.NumericValueExp</a>. |
449 */ |
448 */ |
450 public static ValueExp value(float val) { |
449 public static ValueExp value(float val) { |
451 return new NumericValueExp((double) val); |
450 return new NumericValueExp((double) val); |
452 } |
451 } |
453 |
452 |
457 * |
456 * |
458 * @param val A double value. |
457 * @param val A double value. |
459 * |
458 * |
460 * @return A ValueExp object containing the argument. The |
459 * @return A ValueExp object containing the argument. The |
461 * returned object will be serialized as an instance of the |
460 * returned object will be serialized as an instance of the |
462 * non-public class {@link <a |
461 * non-public class |
463 * href="../../serialized-form.html#javax.management.NumericValueExp"> |
462 * <a href="../../serialized-form.html#javax.management.NumericValueExp"> |
464 * javax.management.NumericValueExp</a>}. |
463 * javax.management.NumericValueExp</a>. |
465 */ |
464 */ |
466 public static ValueExp value(double val) { |
465 public static ValueExp value(double val) { |
467 return new NumericValueExp(val); |
466 return new NumericValueExp(val); |
468 } |
467 } |
469 |
468 |
473 * |
472 * |
474 * @param val A boolean value. |
473 * @param val A boolean value. |
475 * |
474 * |
476 * @return A ValueExp object containing the argument. The |
475 * @return A ValueExp object containing the argument. The |
477 * returned object will be serialized as an instance of the |
476 * returned object will be serialized as an instance of the |
478 * non-public class {@link <a |
477 * non-public class |
479 * href="../../serialized-form.html#javax.management.BooleanValueExp"> |
478 * <a href="../../serialized-form.html#javax.management.BooleanValueExp"> |
480 * javax.management.BooleanValueExp</a>}. |
479 * javax.management.BooleanValueExp</a>. |
481 */ |
480 */ |
482 public static ValueExp value(boolean val) { |
481 public static ValueExp value(boolean val) { |
483 return new BooleanValueExp(val); |
482 return new BooleanValueExp(val); |
484 } |
483 } |
485 |
484 |
490 * @param value1 The first '+' operand. |
489 * @param value1 The first '+' operand. |
491 * @param value2 The second '+' operand. |
490 * @param value2 The second '+' operand. |
492 * |
491 * |
493 * @return A ValueExp representing the sum or concatenation of |
492 * @return A ValueExp representing the sum or concatenation of |
494 * the two arguments. The returned object will be serialized as |
493 * the two arguments. The returned object will be serialized as |
495 * an instance of the non-public class {@link <a |
494 * an instance of the non-public class |
496 * href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
495 * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
497 * javax.management.BinaryOpValueExp</a>} with an {@code op} equal to |
496 * javax.management.BinaryOpValueExp</a> with an {@code op} equal to |
498 * {@link #PLUS}. |
497 * {@link #PLUS}. |
499 */ |
498 */ |
500 public static ValueExp plus(ValueExp value1, ValueExp value2) { |
499 public static ValueExp plus(ValueExp value1, ValueExp value2) { |
501 return new BinaryOpValueExp(PLUS, value1, value2); |
500 return new BinaryOpValueExp(PLUS, value1, value2); |
502 } |
501 } |
508 * @param value1 The first '*' operand. |
507 * @param value1 The first '*' operand. |
509 * @param value2 The second '*' operand. |
508 * @param value2 The second '*' operand. |
510 * |
509 * |
511 * @return A ValueExp representing the product. The returned |
510 * @return A ValueExp representing the product. The returned |
512 * object will be serialized as an instance of the non-public |
511 * object will be serialized as an instance of the non-public |
513 * class {@link <a |
512 * class |
514 * href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
513 * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
515 * javax.management.BinaryOpValueExp</a>} with an {@code op} equal to |
514 * javax.management.BinaryOpValueExp</a> with an {@code op} equal to |
516 * {@link #TIMES}. |
515 * {@link #TIMES}. |
517 */ |
516 */ |
518 public static ValueExp times(ValueExp value1,ValueExp value2) { |
517 public static ValueExp times(ValueExp value1,ValueExp value2) { |
519 return new BinaryOpValueExp(TIMES, value1, value2); |
518 return new BinaryOpValueExp(TIMES, value1, value2); |
520 } |
519 } |
526 * @param value1 The first '-' operand. |
525 * @param value1 The first '-' operand. |
527 * @param value2 The second '-' operand. |
526 * @param value2 The second '-' operand. |
528 * |
527 * |
529 * @return A ValueExp representing the difference between two |
528 * @return A ValueExp representing the difference between two |
530 * arguments. The returned object will be serialized as an |
529 * arguments. The returned object will be serialized as an |
531 * instance of the non-public class {@link <a |
530 * instance of the non-public class |
532 * href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
531 * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
533 * javax.management.BinaryOpValueExp</a>} with an {@code op} equal to |
532 * javax.management.BinaryOpValueExp</a> with an {@code op} equal to |
534 * {@link #MINUS}. |
533 * {@link #MINUS}. |
535 */ |
534 */ |
536 public static ValueExp minus(ValueExp value1, ValueExp value2) { |
535 public static ValueExp minus(ValueExp value1, ValueExp value2) { |
537 return new BinaryOpValueExp(MINUS, value1, value2); |
536 return new BinaryOpValueExp(MINUS, value1, value2); |
538 } |
537 } |
544 * @param value1 The first '/' operand. |
543 * @param value1 The first '/' operand. |
545 * @param value2 The second '/' operand. |
544 * @param value2 The second '/' operand. |
546 * |
545 * |
547 * @return A ValueExp representing the quotient of two arguments. |
546 * @return A ValueExp representing the quotient of two arguments. |
548 * The returned object will be serialized as an instance of the |
547 * The returned object will be serialized as an instance of the |
549 * non-public class {@link <a |
548 * non-public class |
550 * href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
549 * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp"> |
551 * javax.management.BinaryOpValueExp</a>} with an {@code op} equal to |
550 * javax.management.BinaryOpValueExp</a> with an {@code op} equal to |
552 * {@link #DIV}. |
551 * {@link #DIV}. |
553 */ |
552 */ |
554 public static ValueExp div(ValueExp value1, ValueExp value2) { |
553 public static ValueExp div(ValueExp value1, ValueExp value2) { |
555 return new BinaryOpValueExp(DIV, value1, value2); |
554 return new BinaryOpValueExp(DIV, value1, value2); |
556 } |
555 } |
564 * @param s A string value expression representing the beginning of the |
563 * @param s A string value expression representing the beginning of the |
565 * string value. |
564 * string value. |
566 * |
565 * |
567 * @return The constraint that a matches s. The returned object |
566 * @return The constraint that a matches s. The returned object |
568 * will be serialized as an instance of the non-public class |
567 * will be serialized as an instance of the non-public class |
569 * {@link <a |
568 * |
570 * href="../../serialized-form.html#javax.management.MatchQueryExp"> |
569 * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> |
571 * javax.management.MatchQueryExp</a>}. |
570 * javax.management.MatchQueryExp</a>. |
572 */ |
571 */ |
573 public static QueryExp initialSubString(AttributeValueExp a, StringValueExp s) { |
572 public static QueryExp initialSubString(AttributeValueExp a, StringValueExp s) { |
574 return new MatchQueryExp(a, |
573 return new MatchQueryExp(a, |
575 new StringValueExp(escapeString(s.getValue()) + "*")); |
574 new StringValueExp(escapeString(s.getValue()) + "*")); |
576 } |
575 } |
583 * @param a An attribute expression. |
582 * @param a An attribute expression. |
584 * @param s A string value expression representing the substring. |
583 * @param s A string value expression representing the substring. |
585 * |
584 * |
586 * @return The constraint that a matches s. The returned object |
585 * @return The constraint that a matches s. The returned object |
587 * will be serialized as an instance of the non-public class |
586 * will be serialized as an instance of the non-public class |
588 * {@link <a |
587 * |
589 * href="../../serialized-form.html#javax.management.MatchQueryExp"> |
588 * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> |
590 * javax.management.MatchQueryExp</a>}. |
589 * javax.management.MatchQueryExp</a>. |
591 */ |
590 */ |
592 public static QueryExp anySubString(AttributeValueExp a, StringValueExp s) { |
591 public static QueryExp anySubString(AttributeValueExp a, StringValueExp s) { |
593 return new MatchQueryExp(a, |
592 return new MatchQueryExp(a, |
594 new StringValueExp("*" + escapeString(s.getValue()) + "*")); |
593 new StringValueExp("*" + escapeString(s.getValue()) + "*")); |
595 } |
594 } |
603 * @param s A string value expression representing the end of the string |
602 * @param s A string value expression representing the end of the string |
604 * value. |
603 * value. |
605 * |
604 * |
606 * @return The constraint that a matches s. The returned object |
605 * @return The constraint that a matches s. The returned object |
607 * will be serialized as an instance of the non-public class |
606 * will be serialized as an instance of the non-public class |
608 * {@link <a |
607 * |
609 * href="../../serialized-form.html#javax.management.MatchQueryExp"> |
608 * <a href="../../serialized-form.html#javax.management.MatchQueryExp"> |
610 * javax.management.MatchQueryExp</a>}. |
609 * javax.management.MatchQueryExp</a>. |
611 */ |
610 */ |
612 public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s) { |
611 public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s) { |
613 return new MatchQueryExp(a, |
612 return new MatchQueryExp(a, |
614 new StringValueExp("*" + escapeString(s.getValue()))); |
613 new StringValueExp("*" + escapeString(s.getValue()))); |
615 } |
614 } |
628 * |
627 * |
629 * @param classNameValue The {@link StringValueExp} returning the name |
628 * @param classNameValue The {@link StringValueExp} returning the name |
630 * of the class of which selected MBeans should be instances. |
629 * of the class of which selected MBeans should be instances. |
631 * @return a query expression that represents an inheritance |
630 * @return a query expression that represents an inheritance |
632 * constraint on an MBean class. The returned object will be |
631 * constraint on an MBean class. The returned object will be |
633 * serialized as an instance of the non-public class {@link <a |
632 * serialized as an instance of the non-public class |
634 * href="../../serialized-form.html#javax.management.InstanceOfQueryExp"> |
633 * <a href="../../serialized-form.html#javax.management.InstanceOfQueryExp"> |
635 * javax.management.InstanceOfQueryExp</a>}. |
634 * javax.management.InstanceOfQueryExp</a>. |
636 * @since 1.6 |
635 * @since 1.6 |
637 */ |
636 */ |
638 public static QueryExp isInstanceOf(StringValueExp classNameValue) { |
637 public static QueryExp isInstanceOf(StringValueExp classNameValue) { |
639 return new InstanceOfQueryExp(classNameValue); |
638 return new InstanceOfQueryExp(classNameValue); |
640 } |
639 } |