/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
/** * Constructs an int constant value. * Note that this constructor receives <b>the initial value * as the second parameter</b> * unlike the corresponding constructors in the sibling classes. * This is for making a difference from the constructor that receives * an index into the constant pool table as the first parameter. * Note that the index is also int type. * * @param value the initial value. */ public IntegerMemberValue(ConstPool cp, int value) { super('I', cp); setValue(value); }
/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
/** * Constructs an int constant value. * Note that this constructor receives <b>the initial value * as the second parameter</b> * unlike the corresponding constructors in the sibling classes. * This is for making a difference from the constructor that receives * an index into the constant pool table as the first parameter. * Note that the index is also int type. * * @param value the initial value. */ public IntegerMemberValue(ConstPool cp, int value) { super('I', cp); setValue(value); }
((ShortMemberValue) memberValue).setValue((Short) value); } else if (memberValue instanceof IntegerMemberValue) { ((IntegerMemberValue) memberValue).setValue((Integer) value); } else if (memberValue instanceof LongMemberValue) { ((LongMemberValue) memberValue).setValue((Long) value);
((ShortMemberValue) memberValue).setValue((Short) value); } else if (memberValue instanceof IntegerMemberValue) { ((IntegerMemberValue) memberValue).setValue((Integer) value); } else if (memberValue instanceof LongMemberValue) { ((LongMemberValue) memberValue).setValue((Long) value);
discriminator.addMemberValue("discriminatorType", discriminatorType); IntegerMemberValue length = new IntegerMemberValue(constantPool); length.setValue(myInfo.getDiscriminatorLength()); discriminator.addMemberValue("length", length);
/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
/** * Constructs an int constant value. The initial value is 0. */ public IntegerMemberValue(ConstPool cp) { super('I', cp); setValue(0); }
public void visitIntegerMemberValue(final IntegerMemberValue mb) { mb.setValue((Integer) this.value); }
/** * Constructs an int constant value. * Note that this constructor receives <b>the initial value * as the second parameter</b> * unlike the corresponding constructors in the sibling classes. * This is for making a difference from the constructor that receives * an index into the constant pool table as the first parameter. * Note that the index is also int type. * * @param value the initial value. */ public IntegerMemberValue(ConstPool cp, int value) { super('I', cp); setValue(value); }
/** * Constructs an int constant value. * Note that this constructor receives <b>the initial value * as the second parameter</b> * unlike the corresponding constructors in the sibling classes. * This is for making a difference from the constructor that receives * an index into the constant pool table as the first parameter. * Note that the index is also int type. * * @param value the initial value. */ public IntegerMemberValue(ConstPool cp, int value) { super('I', cp); setValue(value); }
/** * Constructs an int constant value. * Note that this constructor receives <b>the initial value * as the second parameter</b> * unlike the corresponding constructors in the sibling classes. * This is for making a difference from the constructor that receives * an index into the constant pool table as the first parameter. * Note that the index is also int type. * * @param value the initial value. */ public IntegerMemberValue(ConstPool cp, int value) { super('I', cp); setValue(value); }
/** * Constructs an int constant value. * Note that this constructor receives <b>the initial value * as the second parameter</b> * unlike the corresponding constructors in the sibling classes. * This is for making a difference from the constructor that receives * an index into the constant pool table as the first parameter. * Note that the index is also int type. * * @param value the initial value. */ public IntegerMemberValue(ConstPool cp, int value) { super('I', cp); setValue(value); }
public void visitIntegerMemberValue(IntegerMemberValue integerMemberValue) { integerMemberValue.setValue(Integer.parseInt(value)); }
/** * Returns the 404 not found response annotation * * @param responseClass * @return */ protected Annotation getNotFoundResponseAnnotation() { ConstPool constPool = ctClass.getClassFile().getConstPool(); Annotation annotation = new Annotation(ApiResponse.class.getCanonicalName(), constPool); IntegerMemberValue code = new IntegerMemberValue(constPool); code.setValue(Response.Status.NOT_FOUND.getStatusCode()); annotation.addMemberValue("code", code); annotation.addMemberValue("message", new StringMemberValue(Response.Status.NOT_FOUND.getReasonPhrase(), constPool)); return annotation; }
/** * Returns the 204 no content response annotation * * @param responseClass * @return */ protected Annotation getNoContentResponseAnnotation() { ConstPool constPool = ctClass.getClassFile().getConstPool(); Annotation annotation = new Annotation(ApiResponse.class.getCanonicalName(), constPool); IntegerMemberValue code = new IntegerMemberValue(constPool); code.setValue(Response.Status.NO_CONTENT.getStatusCode()); annotation.addMemberValue("code", code); annotation.addMemberValue("message", new StringMemberValue(Response.Status.NO_CONTENT.getReasonPhrase(), constPool)); return annotation; }