private ElementValue createElementValue() { int u1tag = dataInput.readUnsignedByte(); switch (u1tag) { case ClassConstants.TYPE_BOOLEAN: case ClassConstants.TYPE_BYTE: case ClassConstants.TYPE_CHAR: case ClassConstants.TYPE_SHORT: case ClassConstants.TYPE_INT: case ClassConstants.TYPE_FLOAT: case ClassConstants.TYPE_LONG: case ClassConstants.TYPE_DOUBLE: case ClassConstants.ELEMENT_VALUE_STRING_CONSTANT: return new ConstantElementValue((char)u1tag); case ClassConstants.ELEMENT_VALUE_ENUM_CONSTANT: return new EnumConstantElementValue(); case ClassConstants.ELEMENT_VALUE_CLASS: return new ClassElementValue(); case ClassConstants.ELEMENT_VALUE_ANNOTATION: return new AnnotationElementValue(); case ClassConstants.ELEMENT_VALUE_ARRAY: return new ArrayElementValue(); default: throw new IllegalArgumentException("Unknown element value tag ["+u1tag+"]"); } } }
private ElementValue createElementValue() { int u1tag = dataInput.readUnsignedByte(); switch (u1tag) { case ClassConstants.INTERNAL_TYPE_BOOLEAN: case ClassConstants.INTERNAL_TYPE_BYTE: case ClassConstants.INTERNAL_TYPE_CHAR: case ClassConstants.INTERNAL_TYPE_SHORT: case ClassConstants.INTERNAL_TYPE_INT: case ClassConstants.INTERNAL_TYPE_FLOAT: case ClassConstants.INTERNAL_TYPE_LONG: case ClassConstants.INTERNAL_TYPE_DOUBLE: case ClassConstants.ELEMENT_VALUE_STRING_CONSTANT: return new ConstantElementValue(u1tag); case ClassConstants.ELEMENT_VALUE_ENUM_CONSTANT: return new EnumConstantElementValue(); case ClassConstants.ELEMENT_VALUE_CLASS: return new ClassElementValue(); case ClassConstants.ELEMENT_VALUE_ANNOTATION: return new AnnotationElementValue(); case ClassConstants.ELEMENT_VALUE_ARRAY: return new ArrayElementValue(); default: throw new IllegalArgumentException("Unknown element value tag ["+u1tag+"]"); } } }
private ElementValue createElementValue() { int u1tag = dataInput.readUnsignedByte(); switch (u1tag) { case ClassConstants.TYPE_BOOLEAN: case ClassConstants.TYPE_BYTE: case ClassConstants.TYPE_CHAR: case ClassConstants.TYPE_SHORT: case ClassConstants.TYPE_INT: case ClassConstants.TYPE_FLOAT: case ClassConstants.TYPE_LONG: case ClassConstants.TYPE_DOUBLE: case ClassConstants.ELEMENT_VALUE_STRING_CONSTANT: return new ConstantElementValue((char)u1tag); case ClassConstants.ELEMENT_VALUE_ENUM_CONSTANT: return new EnumConstantElementValue(); case ClassConstants.ELEMENT_VALUE_CLASS: return new ClassElementValue(); case ClassConstants.ELEMENT_VALUE_ANNOTATION: return new AnnotationElementValue(); case ClassConstants.ELEMENT_VALUE_ARRAY: return new ArrayElementValue(); default: throw new IllegalArgumentException("Unknown element value tag ["+u1tag+"]"); } } }
private ElementValue createElementValue() { int u1tag = dataInput.readUnsignedByte(); switch (u1tag) { case ClassConstants.TYPE_BOOLEAN: case ClassConstants.TYPE_BYTE: case ClassConstants.TYPE_CHAR: case ClassConstants.TYPE_SHORT: case ClassConstants.TYPE_INT: case ClassConstants.TYPE_FLOAT: case ClassConstants.TYPE_LONG: case ClassConstants.TYPE_DOUBLE: case ClassConstants.ELEMENT_VALUE_STRING_CONSTANT: return new ConstantElementValue((char)u1tag); case ClassConstants.ELEMENT_VALUE_ENUM_CONSTANT: return new EnumConstantElementValue(); case ClassConstants.ELEMENT_VALUE_CLASS: return new ClassElementValue(); case ClassConstants.ELEMENT_VALUE_ANNOTATION: return new AnnotationElementValue(); case ClassConstants.ELEMENT_VALUE_ARRAY: return new ArrayElementValue(); default: throw new IllegalArgumentException("Unknown element value tag ["+u1tag+"]"); } } }
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue) { // Create a copy of the element value. AnnotationElementValue newAnnotationElementValue = new AnnotationElementValue(annotationElementValue.u2elementNameIndex == 0 ? 0 : constantAdder.addConstant(clazz, annotationElementValue.u2elementNameIndex), new Annotation()); newAnnotationElementValue.referencedClass = annotationElementValue.referencedClass; newAnnotationElementValue.referencedMethod = annotationElementValue.referencedMethod; annotationElementValue.annotationAccept(clazz, new AnnotationAdder(targetClass, newAnnotationElementValue)); // Add it to the target. addElementValue(newAnnotationElementValue); }
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue) { // Create a copy of the element value. AnnotationElementValue newAnnotationElementValue = new AnnotationElementValue(annotationElementValue.u2elementNameIndex == 0 ? 0 : constantAdder.addConstant(clazz, annotationElementValue.u2elementNameIndex), new Annotation()); newAnnotationElementValue.referencedClass = annotationElementValue.referencedClass; newAnnotationElementValue.referencedMethod = annotationElementValue.referencedMethod; annotationElementValue.annotationAccept(clazz, new AnnotationAdder(targetClass, newAnnotationElementValue)); // Add it to the target. addElementValue(newAnnotationElementValue); }
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue) { // Create a copy of the element value. AnnotationElementValue newAnnotationElementValue = new AnnotationElementValue(annotationElementValue.u2elementNameIndex == 0 ? 0 : constantAdder.addConstant(clazz, annotationElementValue.u2elementNameIndex), new Annotation()); newAnnotationElementValue.referencedClass = annotationElementValue.referencedClass; newAnnotationElementValue.referencedMethod = annotationElementValue.referencedMethod; annotationElementValue.annotationAccept(clazz, new AnnotationAdder(targetClass, newAnnotationElementValue)); // Add it to the target. addElementValue(newAnnotationElementValue); }
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue) { // Create a copy of the element value. AnnotationElementValue newAnnotationElementValue = new AnnotationElementValue(annotationElementValue.u2elementNameIndex == 0 ? 0 : constantAdder.addConstant(clazz, annotationElementValue.u2elementNameIndex), new Annotation()); newAnnotationElementValue.referencedClass = annotationElementValue.referencedClass; newAnnotationElementValue.referencedMethod = annotationElementValue.referencedMethod; annotationElementValue.annotationAccept(clazz, new AnnotationAdder(targetClass, newAnnotationElementValue)); // Add it to the target. addElementValue(newAnnotationElementValue); }