public static NdConstantClass create(Nd nd, NdTypeSignature value) { NdConstantClass result = new NdConstantClass(nd); result.setValue(value); return result; }
public void setValue(NdTypeSignature value) { VALUE.put(getNd(), this.address, value); }
private static Object unpackValue(NdConstant value) { if (value == null) { return null; } if (value instanceof NdConstantAnnotation) { NdConstantAnnotation annotation = (NdConstantAnnotation) value; return createBinaryAnnotation(annotation.getValue()); } if (value instanceof NdConstantArray) { NdConstantArray array = (NdConstantArray) value; List<NdConstant> arrayContents = array.getValue(); Object[] result = new Object[arrayContents.size()]; for (int idx = 0; idx < arrayContents.size(); idx++) { result[idx] = unpackValue(arrayContents.get(idx)); } return result; } if (value instanceof NdConstantEnum) { NdConstantEnum ndConstantEnum = (NdConstantEnum) value; NdTypeSignature signature = ndConstantEnum.getType(); return new EnumConstantSignature(signature.getRawType().getBinaryName(), ndConstantEnum.getValue()); } if (value instanceof NdConstantClass) { NdConstantClass constant = (NdConstantClass) value; return new ClassSignature(constant.getValue().getRawType().getBinaryName()); } return value.getConstant(); }
return NdConstantClass.create(getNd(), typeId); } else if (value instanceof IBinaryAnnotation) { IBinaryAnnotation binaryAnnotation = (IBinaryAnnotation) value;
private static Object unpackValue(NdConstant value) { if (value == null) { return null; } if (value instanceof NdConstantAnnotation) { NdConstantAnnotation annotation = (NdConstantAnnotation) value; return createBinaryAnnotation(annotation.getValue()); } if (value instanceof NdConstantArray) { NdConstantArray array = (NdConstantArray) value; List<NdConstant> arrayContents = array.getValue(); Object[] result = new Object[arrayContents.size()]; for (int idx = 0; idx < arrayContents.size(); idx++) { result[idx] = unpackValue(arrayContents.get(idx)); } return result; } if (value instanceof NdConstantEnum) { NdConstantEnum ndConstantEnum = (NdConstantEnum) value; NdTypeSignature signature = ndConstantEnum.getType(); return new EnumConstantSignature(signature.getRawType().getBinaryName(), ndConstantEnum.getValue()); } if (value instanceof NdConstantClass) { NdConstantClass constant = (NdConstantClass) value; return new ClassSignature(constant.getValue().getRawType().getBinaryName()); } return value.getConstant(); }
return NdConstantClass.create(getNd(), typeId); } else if (value instanceof IBinaryAnnotation) { IBinaryAnnotation binaryAnnotation = (IBinaryAnnotation) value;
public static NdConstantClass create(Nd nd, NdTypeSignature value) { NdConstantClass result = new NdConstantClass(nd); result.setValue(value); return result; }
public void setValue(NdTypeSignature value) { VALUE.put(getNd(), this.address, value); }
public NdTypeSignature getValue() { return VALUE.get(getNd(), this.address); }
public NdTypeSignature getValue() { return VALUE.get(getNd(), this.address); }