public static UnresolvedType[] readArray(DataInputStream s) throws IOException { int len = s.readShort(); if (len == 0) { return UnresolvedType.NONE; } UnresolvedType[] types = new UnresolvedType[len]; for (int i = 0; i < len; i++) { types[i] = UnresolvedType.read(s); } return types; }
public static ResolvedPointcutDefinition read(VersionedDataInputStream s, ISourceContext context) throws IOException { ResolvedPointcutDefinition rpd = new ResolvedPointcutDefinition(UnresolvedType.read(s), s.readInt(), s.readUTF(), UnresolvedType.readArray(s), Pointcut.read(s, context)); rpd.setSourceContext(context); // whilst we have a source context, let's remember it return rpd; }
UnresolvedType declaringType = compressed ? UnresolvedType.forSignature(s.readUtf8(s.readShort())) : UnresolvedType.read(s); int modifiers = s.readInt(); String name = compressed ? s.readUtf8(s.readShort()) : s.readUTF();
public static TypePattern readTypePatternOldStyle(DataInputStream s, ISourceContext context) throws IOException { TypePattern ret = new ExactTypePattern(UnresolvedType.read(s), s.readBoolean(), false); ret.readLocation(context, s); return ret; }
public static TypeVariable read(VersionedDataInputStream s) throws IOException { // if (s.getMajorVersion()>=AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) { String name = s.readUTF(); UnresolvedType ubound = UnresolvedType.read(s); int iboundcount = s.readInt(); UnresolvedType[] ibounds = UnresolvedType.NONE; if (iboundcount > 0) { ibounds = new UnresolvedType[iboundcount]; for (int i = 0; i < iboundcount; i++) { ibounds[i] = UnresolvedType.read(s); } } TypeVariable newVariable = new TypeVariable(name, ubound, ibounds); return newVariable; }
public static AnnotationTypePattern read2(VersionedDataInputStream s, ISourceContext context) throws IOException { BindingAnnotationFieldTypePattern ret = new BindingAnnotationFieldTypePattern(UnresolvedType.read(s), s.readShort(), UnresolvedType.read(s)); ret.formalName = s.readUTF(); ret.readLocation(context, s); return ret; }
public static ResolvedTypeMunger readFieldHost(VersionedDataInputStream s, ISourceContext context) throws IOException { ResolvedMemberImpl signature = ResolvedMemberImpl.readResolvedMember(s, context); UnresolvedType aspect = UnresolvedType.read(s); TypePattern tp = TypePattern.read(s, context); return new FieldHostTypeMunger(signature, aspect, tp); }
public static AnnotationTypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException { ExactAnnotationFieldTypePattern ret; String formalName = s.readUTF(); UnresolvedType annotationType = UnresolvedType.read(s); ret = new ExactAnnotationFieldTypePattern(annotationType, formalName); ret.readLocation(context, s); return ret; }
public static AnnotationTypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException { byte version = s.readByte(); if (version > VERSION) { throw new BCException("BindingAnnotationTypePattern was written by a more recent version of AspectJ"); } AnnotationTypePattern ret = new BindingAnnotationTypePattern(UnresolvedType.read(s), s.readShort()); ret.readLocation(context, s); return ret; } }
public static Pointcut read(VersionedDataInputStream s, ISourceContext context) throws IOException { UnresolvedType onType = null; if (s.readBoolean()) { onType = UnresolvedType.read(s); } ReferencePointcut ret = new ReferencePointcut(onType, s.readUTF(), TypePatternList.read(s, context)); ret.readLocation(context, s); return ret; }
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException { UnresolvedType type = UnresolvedType.read(s); int index = s.readShort(); boolean isVarargs = false; if (s.getMajorVersion() >= AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) { isVarargs = s.readBoolean(); } TypePattern ret = new BindingTypePattern(type, index, isVarargs); ret.readLocation(context, s); return ret; }
public static ResolvedTypeMunger readMethod(VersionedDataInputStream s, ISourceContext context, boolean isEnhanced) throws IOException { ResolvedMemberImpl signature = ResolvedMemberImpl.readResolvedMember(s, context); UnresolvedType aspect = UnresolvedType.read(s); String implClassName = s.readUTF(); TypePattern tp = TypePattern.read(s, context); MethodDelegateTypeMunger typeMunger = new MethodDelegateTypeMunger(signature, aspect, implClassName, tp); UnresolvedType fieldType = null; if (isEnhanced) { fieldType = UnresolvedType.read(s); } else { // a guess... that will work in a lot of cases fieldType = signature.getDeclaringType(); } typeMunger.setFieldType(fieldType); if (isEnhanced) { typeMunger.factoryMethodName = s.readUTF(); typeMunger.factoryMethodSignature = s.readUTF(); typeMunger.bitflags = s.readInt(); } return typeMunger; }
aspectType = UnresolvedType.read(s);
public static ResolvedTypeMunger readInnerClass(VersionedDataInputStream stream, ISourceContext context) throws IOException { /* int version = */stream.readInt(); UnresolvedType targetType = UnresolvedType.read(stream); String memberTypeName = stream.readUTF(); ISourceLocation sourceLocation = readSourceLocation(stream); List<String> typeVarAliases = readInTypeAliases(stream); NewMemberClassTypeMunger newInstance = new NewMemberClassTypeMunger(targetType, memberTypeName); newInstance.setTypeVariableAliases(typeVarAliases); newInstance.setSourceLocation(sourceLocation); return newInstance; }
ret = new ExactAnnotationTypePattern(s.readUTF()); } else { ret = new ExactAnnotationTypePattern(UnresolvedType.read(s));
public static TypePattern readTypePattern150(VersionedDataInputStream s, ISourceContext context) throws IOException { byte version = s.readByte(); if (version > EXACT_VERSION) { throw new BCException("ExactTypePattern was written by a more recent version of AspectJ"); } TypePattern ret = new ExactTypePattern(s.isAtLeast169() ? s.readSignatureAsUnresolvedType() : UnresolvedType.read(s), s .readBoolean(), s.readBoolean()); ret.setAnnotationTypePattern(AnnotationTypePattern.read(s, context)); ret.setTypeParameters(TypePatternList.read(s, context)); ret.readLocation(context, s); return ret; }