You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

World.java 42KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * 2005 Contributors
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * PARC initial implementation
  12. * Adrian Colyer, Andy Clement, overhaul for generics
  13. * ******************************************************************/
  14. package org.aspectj.weaver;
  15. import java.lang.ref.ReferenceQueue;
  16. import java.lang.ref.SoftReference;
  17. import java.lang.ref.WeakReference;
  18. import java.util.ArrayList;
  19. import java.util.HashMap;
  20. import java.util.Iterator;
  21. import java.util.List;
  22. import java.util.Map;
  23. import java.util.Properties;
  24. import java.util.WeakHashMap;
  25. import org.aspectj.asm.IHierarchy;
  26. import org.aspectj.bridge.IMessageHandler;
  27. import org.aspectj.bridge.ISourceLocation;
  28. import org.aspectj.bridge.Message;
  29. import org.aspectj.bridge.MessageUtil;
  30. import org.aspectj.bridge.IMessage.Kind;
  31. import org.aspectj.bridge.context.PinpointingMessageHandler;
  32. import org.aspectj.weaver.UnresolvedType.TypeKind;
  33. import org.aspectj.weaver.bcel.BcelObjectType;
  34. import org.aspectj.weaver.patterns.DeclarePrecedence;
  35. import org.aspectj.weaver.patterns.PerClause;
  36. import org.aspectj.weaver.patterns.Pointcut;
  37. import org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegate;
  38. import org.aspectj.weaver.tools.Trace;
  39. import org.aspectj.weaver.tools.TraceFactory;
  40. /**
  41. * A World is a collection of known types and crosscutting members.
  42. */
  43. public abstract class World implements Dump.INode {
  44. /** handler for any messages produced during resolution etc. */
  45. private IMessageHandler messageHandler = IMessageHandler.SYSTEM_ERR;
  46. /** handler for cross-reference information produced during the weaving process */
  47. private ICrossReferenceHandler xrefHandler = null;
  48. /** Currently 'active' scope in which to lookup (resolve) typevariable references */
  49. private TypeVariableDeclaringElement typeVariableLookupScope;
  50. /** The heart of the world, a map from type signatures to resolved types */
  51. protected TypeMap typeMap = new TypeMap(this); // Signature to ResolvedType
  52. // see pr145963
  53. /** Should we create the hierarchy for binary classes and aspects*/
  54. public static boolean createInjarHierarchy = true;
  55. /** Calculator for working out aspect precedence */
  56. private AspectPrecedenceCalculator precedenceCalculator;
  57. /** All of the type and shadow mungers known to us */
  58. private CrosscuttingMembersSet crosscuttingMembersSet =
  59. new CrosscuttingMembersSet(this);
  60. /** Model holds ASM relationships */
  61. private IHierarchy model = null;
  62. /** for processing Xlint messages */
  63. private Lint lint = new Lint(this);
  64. /** XnoInline option setting passed down to weaver */
  65. private boolean XnoInline;
  66. /** XlazyTjp option setting passed down to weaver */
  67. private boolean XlazyTjp;
  68. /** XhasMember option setting passed down to weaver */
  69. private boolean XhasMember = false;
  70. /** Xpinpoint controls whether we put out developer info showing the source of messages */
  71. private boolean Xpinpoint = false;
  72. /** When behaving in a Java 5 way autoboxing is considered */
  73. private boolean behaveInJava5Way = false;
  74. /** Determines if this world could be used for multiple compiles */
  75. private boolean incrementalCompileCouldFollow = false;
  76. /** The level of the aspectjrt.jar the code we generate needs to run on */
  77. private String targetAspectjRuntimeLevel = Constants.RUNTIME_LEVEL_DEFAULT;
  78. /** Flags for the new joinpoints that are 'optional' */
  79. private boolean optionalJoinpoint_ArrayConstruction = false; // Command line flag: "-Xjoinpoints:arrayconstruction"
  80. private boolean optionalJoinpoint_Synchronization = false; // Command line flag: "-Xjoinpoints:synchronization"
  81. private boolean addSerialVerUID = false;
  82. private Properties extraConfiguration = null;
  83. private boolean checkedAdvancedConfiguration=false;
  84. private boolean synchronizationPointcutsInUse = false;
  85. // Xset'table options
  86. private boolean fastDelegateSupportEnabled = isASMAround;
  87. private boolean runMinimalMemory = false;
  88. public boolean forDEBUG_structuralChangesCode = false;
  89. public boolean forDEBUG_bridgingCode = false;
  90. private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.class);
  91. // Records whether ASM is around ... so we might use it for delegates
  92. protected static boolean isASMAround;
  93. private long errorThreshold;
  94. private long warningThreshold;
  95. static {
  96. try {
  97. Class c = Class.forName("org.aspectj.org.objectweb.asm.ClassVisitor");
  98. isASMAround = true;
  99. } catch (ClassNotFoundException cnfe) {
  100. isASMAround = false;
  101. }
  102. }
  103. /**
  104. * A list of RuntimeExceptions containing full stack information for every
  105. * type we couldn't find.
  106. */
  107. private List dumpState_cantFindTypeExceptions = null;
  108. /**
  109. * Play God.
  110. * On the first day, God created the primitive types and put them in the type
  111. * map.
  112. */
  113. protected World() {
  114. super();
  115. if (trace.isTraceEnabled()) trace.enter("<init>", this);
  116. Dump.registerNode(this.getClass(),this);
  117. typeMap.put("B", ResolvedType.BYTE);
  118. typeMap.put("S", ResolvedType.SHORT);
  119. typeMap.put("I", ResolvedType.INT);
  120. typeMap.put("J", ResolvedType.LONG);
  121. typeMap.put("F", ResolvedType.FLOAT);
  122. typeMap.put("D", ResolvedType.DOUBLE);
  123. typeMap.put("C", ResolvedType.CHAR);
  124. typeMap.put("Z", ResolvedType.BOOLEAN);
  125. typeMap.put("V", ResolvedType.VOID);
  126. precedenceCalculator = new AspectPrecedenceCalculator(this);
  127. if (trace.isTraceEnabled()) trace.exit("<init>");
  128. }
  129. /**
  130. * Dump processing when a fatal error occurs
  131. */
  132. public void accept (Dump.IVisitor visitor) {
  133. visitor.visitString("Shadow mungers:");
  134. visitor.visitList(crosscuttingMembersSet.getShadowMungers());
  135. visitor.visitString("Type mungers:");
  136. visitor.visitList(crosscuttingMembersSet.getTypeMungers());
  137. visitor.visitString("Late Type mungers:");
  138. visitor.visitList(crosscuttingMembersSet.getLateTypeMungers());
  139. if (dumpState_cantFindTypeExceptions!=null) {
  140. visitor.visitString("Cant find type problems:");
  141. visitor.visitList(dumpState_cantFindTypeExceptions);
  142. dumpState_cantFindTypeExceptions = null;
  143. }
  144. }
  145. // =============================================================================
  146. // T Y P E R E S O L U T I O N
  147. // =============================================================================
  148. /**
  149. * Resolve a type that we require to be present in the world
  150. */
  151. public ResolvedType resolve(UnresolvedType ty) {
  152. return resolve(ty, false);
  153. }
  154. /**
  155. * Attempt to resolve a type - the source location gives you some context in which
  156. * resolution is taking place. In the case of an error where we can't find the
  157. * type - we can then at least report why (source location) we were trying to resolve it.
  158. */
  159. public ResolvedType resolve(UnresolvedType ty,ISourceLocation isl) {
  160. ResolvedType ret = resolve(ty,true);
  161. if (ResolvedType.isMissing(ty)) {
  162. //IMessage msg = null;
  163. getLint().cantFindType.signal(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,ty.getName()),isl);
  164. //if (isl!=null) {
  165. //msg = MessageUtil.error(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,ty.getName()),isl);
  166. //} else {
  167. //msg = MessageUtil.error(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,ty.getName()));
  168. //}
  169. //messageHandler.handleMessage(msg);
  170. }
  171. return ret;
  172. }
  173. /**
  174. * Convenience method for resolving an array of unresolved types
  175. * in one hit. Useful for e.g. resolving type parameters in signatures.
  176. */
  177. public ResolvedType[] resolve(UnresolvedType[] types) {
  178. if (types == null) return new ResolvedType[0];
  179. ResolvedType[] ret = new ResolvedType[types.length];
  180. for (int i=0; i<types.length; i++) {
  181. ret[i] = resolve(types[i]);
  182. }
  183. return ret;
  184. }
  185. /**
  186. * Resolve a type. This the hub of type resolution. The resolved type is added
  187. * to the type map by signature.
  188. */
  189. public ResolvedType resolve(UnresolvedType ty, boolean allowMissing) {
  190. // special resolution processing for already resolved types.
  191. if (ty instanceof ResolvedType) {
  192. ResolvedType rty = (ResolvedType) ty;
  193. rty = resolve(rty);
  194. return rty;
  195. }
  196. // dispatch back to the type variable reference to resolve its constituent parts
  197. // don't do this for other unresolved types otherwise you'll end up in a loop
  198. if (ty.isTypeVariableReference()) {
  199. return ty.resolve(this);
  200. }
  201. // if we've already got a resolved type for the signature, just return it
  202. // after updating the world
  203. String signature = ty.getSignature();
  204. ResolvedType ret = typeMap.get(signature);
  205. if (ret != null) {
  206. ret.world = this; // Set the world for the RTX
  207. return ret;
  208. } else if ( signature.equals("?") || signature.equals("*")) {
  209. // might be a problem here, not sure '?' should make it to here as a signature, the
  210. // proper signature for wildcard '?' is '*'
  211. // fault in generic wildcard, can't be done earlier because of init issues
  212. ResolvedType something = new BoundedReferenceType("?","Ljava/lang/Object",this);
  213. typeMap.put("?",something);
  214. return something;
  215. }
  216. // no existing resolved type, create one
  217. if (ty.isArray()) {
  218. ResolvedType componentType = resolve(ty.getComponentType(),allowMissing);
  219. //String brackets = signature.substring(0,signature.lastIndexOf("[")+1);
  220. ret = new ResolvedType.Array(signature, "["+componentType.getErasureSignature(),
  221. this,
  222. componentType);
  223. } else {
  224. ret = resolveToReferenceType(ty);
  225. if (!allowMissing && ret.isMissing()) {
  226. ret = handleRequiredMissingTypeDuringResolution(ty);
  227. }
  228. }
  229. // Pulling in the type may have already put the right entry in the map
  230. if (typeMap.get(signature)==null && !ret.isMissing()) {
  231. typeMap.put(signature, ret);
  232. }
  233. return ret;
  234. }
  235. /**
  236. * We tried to resolve a type and couldn't find it...
  237. */
  238. private ResolvedType handleRequiredMissingTypeDuringResolution(UnresolvedType ty) {
  239. // defer the message until someone asks a question of the type that we can't answer
  240. // just from the signature.
  241. // MessageUtil.error(messageHandler,
  242. // WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,ty.getName()));
  243. if (dumpState_cantFindTypeExceptions==null) {
  244. dumpState_cantFindTypeExceptions = new ArrayList();
  245. }
  246. dumpState_cantFindTypeExceptions.add(new RuntimeException("Can't find type "+ty.getName()));
  247. return new MissingResolvedTypeWithKnownSignature(ty.getSignature(),this);
  248. }
  249. /**
  250. * Some TypeFactory operations create resolved types directly, but these won't be
  251. * in the typeMap - this resolution process puts them there. Resolved types are
  252. * also told their world which is needed for the special autoboxing resolved types.
  253. */
  254. public ResolvedType resolve(ResolvedType ty) {
  255. if (ty.isTypeVariableReference()) return ty; // until type variables have proper sigs...
  256. ResolvedType resolved = typeMap.get(ty.getSignature());
  257. if (resolved == null) {
  258. typeMap.put(ty.getSignature(), ty);
  259. resolved = ty;
  260. }
  261. resolved.world = this;
  262. return resolved;
  263. }
  264. /**
  265. * Convenience method for finding a type by name and resolving it in one step.
  266. */
  267. public ResolvedType resolve(String name) {
  268. // trace.enter("resolve", this, new Object[] {name});
  269. ResolvedType ret = resolve(UnresolvedType.forName(name));
  270. // trace.exit("resolve", ret);
  271. return ret;
  272. }
  273. public ResolvedType resolve(String name,boolean allowMissing) {
  274. return resolve(UnresolvedType.forName(name),allowMissing);
  275. }
  276. private ResolvedType currentlyResolvingBaseType;
  277. /**
  278. * Resolve to a ReferenceType - simple, raw, parameterized, or generic.
  279. * Raw, parameterized, and generic versions of a type share a delegate.
  280. */
  281. private final ResolvedType resolveToReferenceType(UnresolvedType ty) {
  282. if (ty.isParameterizedType()) {
  283. // ======= parameterized types ================
  284. ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false);
  285. currentlyResolvingBaseType = genericType;
  286. ReferenceType parameterizedType =
  287. TypeFactory.createParameterizedType(genericType, ty.typeParameters, this);
  288. currentlyResolvingBaseType = null;
  289. return parameterizedType;
  290. } else if (ty.isGenericType()) {
  291. // ======= generic types ======================
  292. ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false);
  293. return genericType;
  294. } else if (ty.isGenericWildcard()) {
  295. // ======= generic wildcard types =============
  296. return resolveGenericWildcardFor(ty);
  297. } else {
  298. // ======= simple and raw types ===============
  299. String erasedSignature = ty.getErasureSignature();
  300. ReferenceType simpleOrRawType = new ReferenceType(erasedSignature, this);
  301. if (ty.needsModifiableDelegate()) simpleOrRawType.setNeedsModifiableDelegate(true);
  302. ReferenceTypeDelegate delegate = resolveDelegate(simpleOrRawType);
  303. // 117854
  304. // if (delegate == null) return ResolvedType.MISSING;
  305. if (delegate == null) return new MissingResolvedTypeWithKnownSignature(ty.getSignature(),erasedSignature,this);//ResolvedType.MISSING;
  306. if (delegate.isGeneric() && behaveInJava5Way) {
  307. // ======== raw type ===========
  308. simpleOrRawType.typeKind = TypeKind.RAW;
  309. ReferenceType genericType = makeGenericTypeFrom(delegate,simpleOrRawType);
  310. // name = ReferenceType.fromTypeX(UnresolvedType.forRawTypeNames(ty.getName()),this);
  311. simpleOrRawType.setDelegate(delegate);
  312. genericType.setDelegate(delegate);
  313. simpleOrRawType.setGenericType(genericType);
  314. return simpleOrRawType;
  315. } else {
  316. // ======== simple type =========
  317. simpleOrRawType.setDelegate(delegate);
  318. return simpleOrRawType;
  319. }
  320. }
  321. }
  322. /**
  323. * Attempt to resolve a type that should be a generic type.
  324. */
  325. public ResolvedType resolveGenericTypeFor(UnresolvedType anUnresolvedType, boolean allowMissing) {
  326. // Look up the raw type by signature
  327. String rawSignature = anUnresolvedType.getRawType().getSignature();
  328. ResolvedType rawType = (ResolvedType) typeMap.get(rawSignature);
  329. if (rawType==null) {
  330. rawType = resolve(UnresolvedType.forSignature(rawSignature),false);
  331. typeMap.put(rawSignature,rawType);
  332. }
  333. // Does the raw type know its generic form? (It will if we created the
  334. // raw type from a source type, it won't if its been created just through
  335. // being referenced, e.g. java.util.List
  336. ResolvedType genericType = rawType.getGenericType();
  337. // There is a special case to consider here (testGenericsBang_pr95993 highlights it)
  338. // You may have an unresolvedType for a parameterized type but it
  339. // is backed by a simple type rather than a generic type. This occurs for
  340. // inner types of generic types that inherit their enclosing types
  341. // type variables.
  342. if (rawType.isSimpleType() && (anUnresolvedType.typeParameters==null || anUnresolvedType.typeParameters.length==0)) {
  343. rawType.world = this;
  344. return rawType;
  345. }
  346. if (genericType != null) {
  347. genericType.world = this;
  348. return genericType;
  349. } else {
  350. // Fault in the generic that underpins the raw type ;)
  351. ReferenceTypeDelegate delegate = resolveDelegate((ReferenceType)rawType);
  352. ReferenceType genericRefType = makeGenericTypeFrom(delegate,((ReferenceType)rawType));
  353. ((ReferenceType)rawType).setGenericType(genericRefType);
  354. genericRefType.setDelegate(delegate);
  355. ((ReferenceType)rawType).setDelegate(delegate);
  356. return genericRefType;
  357. }
  358. }
  359. private ReferenceType makeGenericTypeFrom(ReferenceTypeDelegate delegate, ReferenceType rawType) {
  360. String genericSig = delegate.getDeclaredGenericSignature();
  361. if (genericSig != null) {
  362. return new ReferenceType(
  363. UnresolvedType.forGenericTypeSignature(rawType.getSignature(),delegate.getDeclaredGenericSignature()),this);
  364. } else {
  365. return new ReferenceType(
  366. UnresolvedType.forGenericTypeVariables(rawType.getSignature(), delegate.getTypeVariables()),this);
  367. }
  368. }
  369. /**
  370. * Go from an unresolved generic wildcard (represented by UnresolvedType) to a resolved version (BoundedReferenceType).
  371. */
  372. private ReferenceType resolveGenericWildcardFor(UnresolvedType aType) {
  373. BoundedReferenceType ret = null;
  374. // FIXME asc doesnt take account of additional interface bounds (e.g. ? super R & Serializable - can you do that?)
  375. if (aType.isExtends()) {
  376. ReferenceType upperBound = (ReferenceType)resolve(aType.getUpperBound());
  377. ret = new BoundedReferenceType(upperBound,true,this);
  378. } else if (aType.isSuper()) {
  379. ReferenceType lowerBound = (ReferenceType) resolve(aType.getLowerBound());
  380. ret = new BoundedReferenceType(lowerBound,false,this);
  381. } else {
  382. // must be ? on its own!
  383. }
  384. return ret;
  385. }
  386. /**
  387. * Find the ReferenceTypeDelegate behind this reference type so that it can
  388. * fulfill its contract.
  389. */
  390. protected abstract ReferenceTypeDelegate resolveDelegate(ReferenceType ty);
  391. /**
  392. * Special resolution for "core" types like OBJECT. These are resolved just like
  393. * any other type, but if they are not found it is more serious and we issue an
  394. * error message immediately.
  395. */
  396. public ResolvedType getCoreType(UnresolvedType tx) {
  397. ResolvedType coreTy = resolve(tx,true);
  398. if (coreTy.isMissing()) {
  399. MessageUtil.error(messageHandler,
  400. WeaverMessages.format(WeaverMessages.CANT_FIND_CORE_TYPE,tx.getName()));
  401. }
  402. return coreTy;
  403. }
  404. /**
  405. * Lookup a type by signature, if not found then build one and put it in the
  406. * map.
  407. */
  408. public ReferenceType lookupOrCreateName(UnresolvedType ty) {
  409. String signature = ty.getSignature();
  410. ReferenceType ret = lookupBySignature(signature);
  411. if (ret == null) {
  412. ret = ReferenceType.fromTypeX(ty, this);
  413. typeMap.put(signature, ret);
  414. }
  415. return ret;
  416. }
  417. /**
  418. * Lookup a reference type in the world by its signature. Returns
  419. * null if not found.
  420. */
  421. public ReferenceType lookupBySignature(String signature) {
  422. return (ReferenceType) typeMap.get(signature);
  423. }
  424. // =============================================================================
  425. // T Y P E R E S O L U T I O N -- E N D
  426. // =============================================================================
  427. /**
  428. * Member resolution is achieved by resolving the declaring type and then
  429. * looking up the member in the resolved declaring type.
  430. */
  431. public ResolvedMember resolve(Member member) {
  432. ResolvedType declaring = member.getDeclaringType().resolve(this);
  433. if (declaring.isRawType()) declaring = declaring.getGenericType();
  434. ResolvedMember ret;
  435. if (member.getKind() == Member.FIELD) {
  436. ret = declaring.lookupField(member);
  437. } else {
  438. ret = declaring.lookupMethod(member);
  439. }
  440. if (ret != null) return ret;
  441. return declaring.lookupSyntheticMember(member);
  442. }
  443. // Methods for creating various cross-cutting members...
  444. // ===========================================================
  445. /**
  446. * Create an advice shadow munger from the given advice attribute
  447. */
  448. public abstract Advice createAdviceMunger(
  449. AjAttribute.AdviceAttribute attribute,
  450. Pointcut pointcut,
  451. Member signature);
  452. /**
  453. * Create an advice shadow munger for the given advice kind
  454. */
  455. public final Advice createAdviceMunger(
  456. AdviceKind kind,
  457. Pointcut p,
  458. Member signature,
  459. int extraParameterFlags,
  460. IHasSourceLocation loc)
  461. {
  462. AjAttribute.AdviceAttribute attribute =
  463. new AjAttribute.AdviceAttribute(kind, p, extraParameterFlags, loc.getStart(), loc.getEnd(), loc.getSourceContext());
  464. return createAdviceMunger(attribute, p, signature);
  465. }
  466. public abstract ConcreteTypeMunger makeCflowStackFieldAdder(ResolvedMember cflowField);
  467. public abstract ConcreteTypeMunger makeCflowCounterFieldAdder(ResolvedMember cflowField);
  468. /**
  469. * Register a munger for perclause @AJ aspect so that we add aspectOf(..) to them as needed
  470. * @see org.aspectj.weaver.bcel.BcelWorld#makePerClauseAspect(ResolvedType, org.aspectj.weaver.patterns.PerClause.Kind)
  471. */
  472. public abstract ConcreteTypeMunger makePerClauseAspect(ResolvedType aspect, PerClause.Kind kind);
  473. public abstract ConcreteTypeMunger concreteTypeMunger(ResolvedTypeMunger munger, ResolvedType aspectType);
  474. /**
  475. * Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareTo
  476. */
  477. public int compareByPrecedence(ResolvedType aspect1, ResolvedType aspect2) {
  478. return precedenceCalculator.compareByPrecedence(aspect1, aspect2);
  479. }
  480. public Integer getPrecedenceIfAny(ResolvedType aspect1, ResolvedType aspect2) {
  481. return precedenceCalculator.getPrecedenceIfAny(aspect1, aspect2);
  482. }
  483. /**
  484. * compares by precedence with the additional rule that a super-aspect is
  485. * sorted before its sub-aspects
  486. */
  487. public int compareByPrecedenceAndHierarchy(ResolvedType aspect1, ResolvedType aspect2) {
  488. return precedenceCalculator.compareByPrecedenceAndHierarchy(aspect1, aspect2);
  489. }
  490. // simple property getter and setters
  491. // ===========================================================
  492. /**
  493. * Nobody should hold onto a copy of this message handler, or setMessageHandler won't
  494. * work right.
  495. */
  496. public IMessageHandler getMessageHandler() {
  497. return messageHandler;
  498. }
  499. public void setMessageHandler(IMessageHandler messageHandler) {
  500. if (this.isInPinpointMode()) {
  501. this.messageHandler = new PinpointingMessageHandler(messageHandler);
  502. } else {
  503. this.messageHandler = messageHandler;
  504. }
  505. }
  506. /**
  507. * convenenience method for creating and issuing messages via the message handler -
  508. * if you supply two locations you will get two messages.
  509. */
  510. public void showMessage(
  511. Kind kind,
  512. String message,
  513. ISourceLocation loc1,
  514. ISourceLocation loc2)
  515. {
  516. if (loc1 != null) {
  517. messageHandler.handleMessage(new Message(message, kind, null, loc1));
  518. if (loc2 != null) {
  519. messageHandler.handleMessage(new Message(message, kind, null, loc2));
  520. }
  521. } else {
  522. messageHandler.handleMessage(new Message(message, kind, null, loc2));
  523. }
  524. }
  525. public boolean debug (String message) {
  526. return MessageUtil.debug(messageHandler,message);
  527. }
  528. public void setCrossReferenceHandler(ICrossReferenceHandler xrefHandler) {
  529. this.xrefHandler = xrefHandler;
  530. }
  531. /**
  532. * Get the cross-reference handler for the world, may be null.
  533. */
  534. public ICrossReferenceHandler getCrossReferenceHandler() {
  535. return this.xrefHandler;
  536. }
  537. public void setTypeVariableLookupScope(TypeVariableDeclaringElement scope) {
  538. this.typeVariableLookupScope = scope;
  539. }
  540. public TypeVariableDeclaringElement getTypeVariableLookupScope() {
  541. return typeVariableLookupScope;
  542. }
  543. public List getDeclareParents() {
  544. return crosscuttingMembersSet.getDeclareParents();
  545. }
  546. public List getDeclareAnnotationOnTypes() {
  547. return crosscuttingMembersSet.getDeclareAnnotationOnTypes();
  548. }
  549. public List getDeclareAnnotationOnFields() {
  550. return crosscuttingMembersSet.getDeclareAnnotationOnFields();
  551. }
  552. public List getDeclareAnnotationOnMethods() {
  553. return crosscuttingMembersSet.getDeclareAnnotationOnMethods();
  554. }
  555. public List getDeclareSoft() {
  556. return crosscuttingMembersSet.getDeclareSofts();
  557. }
  558. public CrosscuttingMembersSet getCrosscuttingMembersSet() {
  559. return crosscuttingMembersSet;
  560. }
  561. public IHierarchy getModel() {
  562. return model;
  563. }
  564. public void setModel(IHierarchy model) {
  565. this.model = model;
  566. }
  567. public Lint getLint() {
  568. return lint;
  569. }
  570. public void setLint(Lint lint) {
  571. this.lint = lint;
  572. }
  573. public boolean isXnoInline() {
  574. return XnoInline;
  575. }
  576. public void setXnoInline(boolean xnoInline) {
  577. XnoInline = xnoInline;
  578. }
  579. public boolean isXlazyTjp() {
  580. return XlazyTjp;
  581. }
  582. public void setXlazyTjp(boolean b) {
  583. XlazyTjp = b;
  584. }
  585. public boolean isHasMemberSupportEnabled() {
  586. return XhasMember;
  587. }
  588. public void setXHasMemberSupportEnabled(boolean b) {
  589. XhasMember = b;
  590. }
  591. public boolean isInPinpointMode() {
  592. return Xpinpoint;
  593. }
  594. public void setPinpointMode(boolean b) {
  595. this.Xpinpoint = b;
  596. }
  597. public void setBehaveInJava5Way(boolean b) {
  598. behaveInJava5Way = b;
  599. }
  600. /**
  601. * Set the error and warning threashold which can be taken from
  602. * CompilerOptions (see bug 129282)
  603. *
  604. * @param errorThreshold
  605. * @param warningThreshold
  606. */
  607. public void setErrorAndWarningThreshold(long errorThreshold, long warningThreshold) {
  608. this.errorThreshold = errorThreshold;
  609. this.warningThreshold = warningThreshold;
  610. }
  611. /**
  612. * @return true if ignoring the UnusedDeclaredThrownException and false if
  613. * this compiler option is set to error or warning
  614. */
  615. public boolean isIgnoringUnusedDeclaredThrownException() {
  616. // the 0x800000 is CompilerOptions.UnusedDeclaredThrownException
  617. // which is ASTNode.bit24
  618. if((this.errorThreshold & 0x800000) != 0
  619. || (this.warningThreshold & 0x800000) != 0)
  620. return false;
  621. return true;
  622. }
  623. public void performExtraConfiguration(String config) {
  624. if (config==null) return;
  625. // Bunch of name value pairs to split
  626. extraConfiguration = new Properties();
  627. int pos =-1;
  628. while ((pos=config.indexOf(","))!=-1) {
  629. String nvpair = config.substring(0,pos);
  630. int pos2 = nvpair.indexOf("=");
  631. if (pos2!=-1) {
  632. String n = nvpair.substring(0,pos2);
  633. String v = nvpair.substring(pos2+1);
  634. extraConfiguration.setProperty(n,v);
  635. }
  636. config = config.substring(pos+1);
  637. }
  638. if (config.length()>0) {
  639. int pos2 = config.indexOf("=");
  640. if (pos2!=-1) {
  641. String n = config.substring(0,pos2);
  642. String v = config.substring(pos2+1);
  643. extraConfiguration.setProperty(n,v);
  644. }
  645. }
  646. }
  647. /**
  648. * may return null
  649. */
  650. public Properties getExtraConfiguration() {
  651. return extraConfiguration;
  652. }
  653. public final static String xsetCAPTURE_ALL_CONTEXT = "captureAllContext"; // default false
  654. public final static String xsetACTIVATE_LIGHTWEIGHT_DELEGATES = "activateLightweightDelegates"; // default true
  655. public final static String xsetRUN_MINIMAL_MEMORY ="runMinimalMemory"; // default true
  656. public final static String xsetDEBUG_STRUCTURAL_CHANGES_CODE = "debugStructuralChangesCode"; // default false
  657. public final static String xsetDEBUG_BRIDGING = "debugBridging"; // default false
  658. public boolean isInJava5Mode() {
  659. return behaveInJava5Way;
  660. }
  661. public void setTargetAspectjRuntimeLevel(String s) {
  662. targetAspectjRuntimeLevel = s;
  663. }
  664. public void setOptionalJoinpoints(String jps) {
  665. if (jps==null) return;
  666. if (jps.indexOf("arrayconstruction")!=-1) optionalJoinpoint_ArrayConstruction = true;
  667. if (jps.indexOf("synchronization")!=-1) optionalJoinpoint_Synchronization = true;
  668. }
  669. public boolean isJoinpointArrayConstructionEnabled() {
  670. return optionalJoinpoint_ArrayConstruction;
  671. }
  672. public boolean isJoinpointSynchronizationEnabled() {
  673. return optionalJoinpoint_Synchronization;
  674. }
  675. public String getTargetAspectjRuntimeLevel() {
  676. return targetAspectjRuntimeLevel;
  677. }
  678. public boolean isTargettingAspectJRuntime12() {
  679. boolean b = false; // pr116679
  680. if (!isInJava5Mode()) b=true;
  681. else b = getTargetAspectjRuntimeLevel().equals(org.aspectj.weaver.Constants.RUNTIME_LEVEL_12);
  682. //System.err.println("Asked if targetting runtime 1.2 , returning: "+b);
  683. return b;
  684. }
  685. /*
  686. * Map of types in the world, can have 'references' to expendable ones which
  687. * can be garbage collected to recover memory.
  688. * An expendable type is a reference type that is not exposed to the weaver (ie
  689. * just pulled in for type resolution purposes).
  690. */
  691. protected static class TypeMap {
  692. private static boolean debug = false;
  693. // Strategy for entries in the expendable map
  694. public static int DONT_USE_REFS = 0; // Hang around forever
  695. public static int USE_WEAK_REFS = 1; // Collected asap
  696. public static int USE_SOFT_REFS = 2; // Collected when short on memory
  697. // SECRETAPI - Can switch to a policy of choice ;)
  698. public static int policy = USE_SOFT_REFS;
  699. // Map of types that never get thrown away
  700. private Map /* String -> ResolvedType */ tMap = new HashMap();
  701. // Map of types that may be ejected from the cache if we need space
  702. private Map expendableMap = new WeakHashMap();
  703. private World w;
  704. // profiling tools...
  705. private boolean memoryProfiling = false;
  706. private int maxExpendableMapSize = -1;
  707. private int collectedTypes = 0;
  708. private ReferenceQueue rq = new ReferenceQueue();
  709. private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.TypeMap.class);
  710. TypeMap(World w) {
  711. if (trace.isTraceEnabled()) trace.enter("<init>",this,w);
  712. this.w = w;
  713. memoryProfiling = false;// !w.getMessageHandler().isIgnoring(Message.INFO);
  714. if (trace.isTraceEnabled()) trace.exit("<init>");
  715. }
  716. /**
  717. * Add a new type into the map, the key is the type signature.
  718. * Some types do *not* go in the map, these are ones involving
  719. * *member* type variables. The reason is that when all you have is the
  720. * signature which gives you a type variable name, you cannot
  721. * guarantee you are using the type variable in the same way
  722. * as someone previously working with a similarly
  723. * named type variable. So, these do not go into the map:
  724. * - TypeVariableReferenceType.
  725. * - ParameterizedType where a member type variable is involved.
  726. * - BoundedReferenceType when one of the bounds is a type variable.
  727. *
  728. * definition: "member type variables" - a tvar declared on a generic
  729. * method/ctor as opposed to those you see declared on a generic type.
  730. */
  731. public ResolvedType put(String key, ResolvedType type) {
  732. if (type.isParameterizedType() && type.isParameterizedWithAMemberTypeVariable()) {
  733. if (debug)
  734. System.err.println("Not putting a parameterized type that utilises member declared type variables into the typemap: key="+key+" type="+type);
  735. return type;
  736. }
  737. if (type.isTypeVariableReference()) {
  738. if (debug)
  739. System.err.println("Not putting a type variable reference type into the typemap: key="+key+" type="+type);
  740. return type;
  741. }
  742. // this test should be improved - only avoid putting them in if one of the
  743. // bounds is a member type variable
  744. if (type instanceof BoundedReferenceType) {
  745. if (debug)
  746. System.err.println("Not putting a bounded reference type into the typemap: key="+key+" type="+type);
  747. return type;
  748. }
  749. if (type instanceof MissingResolvedTypeWithKnownSignature) {
  750. if (debug)
  751. System.err.println("Not putting a missing type into the typemap: key="+key+" type="+type);
  752. return type;
  753. }
  754. if ((type instanceof ReferenceType) && (((ReferenceType)type).getDelegate()==null) && w.isExpendable(type)) {
  755. if (debug)
  756. System.err.println("Not putting expendable ref type with null delegate into typemap: key="+key+" type="+type);
  757. return type;
  758. }
  759. if (w.isExpendable(type)) {
  760. // Dont use reference queue for tracking if not profiling...
  761. if (policy==USE_WEAK_REFS) {
  762. if (memoryProfiling) expendableMap.put(key,new WeakReference(type,rq));
  763. else expendableMap.put(key,new WeakReference(type));
  764. } else if (policy==USE_SOFT_REFS) {
  765. if (memoryProfiling) expendableMap.put(key,new SoftReference(type,rq));
  766. else expendableMap.put(key,new SoftReference(type));
  767. } else {
  768. expendableMap.put(key,type);
  769. }
  770. if (memoryProfiling && expendableMap.size()>maxExpendableMapSize) {
  771. maxExpendableMapSize = expendableMap.size();
  772. }
  773. return type;
  774. } else {
  775. return (ResolvedType) tMap.put(key,type);
  776. }
  777. }
  778. public void report() {
  779. if (!memoryProfiling) return;
  780. checkq();
  781. w.getMessageHandler().handleMessage(MessageUtil.info("MEMORY: world expendable type map reached maximum size of #"+maxExpendableMapSize+" entries"));
  782. w.getMessageHandler().handleMessage(MessageUtil.info("MEMORY: types collected through garbage collection #"+collectedTypes+" entries"));
  783. }
  784. public void checkq() {
  785. if (!memoryProfiling) return;
  786. while (rq.poll()!=null) collectedTypes++;
  787. }
  788. /**
  789. * Lookup a type by its signature, always look
  790. * in the real map before the expendable map
  791. */
  792. public ResolvedType get(String key) {
  793. checkq();
  794. ResolvedType ret = (ResolvedType) tMap.get(key);
  795. if (ret == null) {
  796. if (policy==USE_WEAK_REFS) {
  797. WeakReference ref = (WeakReference)expendableMap.get(key);
  798. if (ref != null) {
  799. ret = (ResolvedType) ref.get();
  800. }
  801. } else if (policy==USE_SOFT_REFS) {
  802. SoftReference ref = (SoftReference)expendableMap.get(key);
  803. if (ref != null) {
  804. ret = (ResolvedType) ref.get();
  805. }
  806. } else {
  807. return (ResolvedType)expendableMap.get(key);
  808. }
  809. }
  810. return ret;
  811. }
  812. /** Remove a type from the map */
  813. public ResolvedType remove(String key) {
  814. ResolvedType ret = (ResolvedType) tMap.remove(key);
  815. if (ret == null) {
  816. if (policy==USE_WEAK_REFS) {
  817. WeakReference wref = (WeakReference)expendableMap.remove(key);
  818. if (wref!=null) ret = (ResolvedType)wref.get();
  819. } else if (policy==USE_SOFT_REFS) {
  820. SoftReference wref = (SoftReference)expendableMap.remove(key);
  821. if (wref!=null) ret = (ResolvedType)wref.get();
  822. } else {
  823. ret = (ResolvedType)expendableMap.remove(key);
  824. }
  825. }
  826. return ret;
  827. }
  828. public String toString() {
  829. StringBuffer sb = new StringBuffer();
  830. sb.append("types:\n");
  831. sb.append(dumpthem(tMap));
  832. sb.append("expendables:\n");
  833. sb.append(dumpthem(expendableMap));
  834. return sb.toString();
  835. }
  836. private String dumpthem(Map m) {
  837. StringBuffer sb = new StringBuffer();
  838. int otherTypes = 0;
  839. int bcelDel = 0;
  840. int refDel = 0;
  841. for (Iterator iter = m.entrySet().iterator(); iter.hasNext();) {
  842. Map.Entry entry = (Map.Entry) iter.next();
  843. Object val = entry.getValue();
  844. if (val instanceof WeakReference) {
  845. val = ((WeakReference)val).get();
  846. } else
  847. if (val instanceof SoftReference) {
  848. val = ((SoftReference)val).get();
  849. }
  850. sb.append(entry.getKey()+"="+val).append("\n");
  851. if (val instanceof ReferenceType) {
  852. ReferenceType refType = (ReferenceType)val;
  853. if (refType.getDelegate() instanceof BcelObjectType) {
  854. bcelDel++;
  855. } else if (refType.getDelegate() instanceof ReflectionBasedReferenceTypeDelegate) {
  856. refDel++;
  857. } else {
  858. otherTypes++;
  859. }
  860. } else {
  861. otherTypes++;
  862. }
  863. }
  864. sb.append("# BCEL = "+bcelDel+", # REF = "+refDel+", # Other = "+otherTypes);
  865. return sb.toString();
  866. }
  867. public int totalSize() {
  868. return tMap.size()+expendableMap.size();
  869. }
  870. public int hardSize() {
  871. return tMap.size();
  872. }
  873. }
  874. /** Reference types we don't intend to weave may be ejected from
  875. * the cache if we need the space.
  876. */
  877. protected boolean isExpendable(ResolvedType type) {
  878. return (
  879. !type.equals(UnresolvedType.OBJECT) &&
  880. (type != null) &&
  881. (!type.isExposedToWeaver()) &&
  882. (!type.isPrimitiveType())
  883. );
  884. }
  885. /**
  886. * This class is used to compute and store precedence relationships between
  887. * aspects.
  888. */
  889. private static class AspectPrecedenceCalculator {
  890. private World world;
  891. private Map cachedResults;
  892. public AspectPrecedenceCalculator(World forSomeWorld) {
  893. this.world = forSomeWorld;
  894. this.cachedResults = new HashMap();
  895. }
  896. /**
  897. * Ask every declare precedence in the world to order the two aspects.
  898. * If more than one declare precedence gives an ordering, and the orderings
  899. * conflict, then that's an error.
  900. */
  901. public int compareByPrecedence(ResolvedType firstAspect, ResolvedType secondAspect) {
  902. PrecedenceCacheKey key = new PrecedenceCacheKey(firstAspect,secondAspect);
  903. if (cachedResults.containsKey(key)) {
  904. return ((Integer) cachedResults.get(key)).intValue();
  905. } else {
  906. int order = 0;
  907. DeclarePrecedence orderer = null; // Records the declare precedence statement that gives the first ordering
  908. for (Iterator i = world.getCrosscuttingMembersSet().getDeclareDominates().iterator(); i.hasNext(); ) {
  909. DeclarePrecedence d = (DeclarePrecedence)i.next();
  910. int thisOrder = d.compare(firstAspect, secondAspect);
  911. if (thisOrder != 0) {
  912. if (orderer==null) orderer = d;
  913. if (order != 0 && order != thisOrder) {
  914. ISourceLocation[] isls = new ISourceLocation[2];
  915. isls[0]=orderer.getSourceLocation();
  916. isls[1]=d.getSourceLocation();
  917. Message m =
  918. new Message("conflicting declare precedence orderings for aspects: "+
  919. firstAspect.getName()+" and "+secondAspect.getName(),null,true,isls);
  920. world.getMessageHandler().handleMessage(m);
  921. } else {
  922. order = thisOrder;
  923. }
  924. }
  925. }
  926. cachedResults.put(key, new Integer(order));
  927. return order;
  928. }
  929. }
  930. public Integer getPrecedenceIfAny(ResolvedType aspect1,ResolvedType aspect2) {
  931. return (Integer)cachedResults.get(new PrecedenceCacheKey(aspect1,aspect2));
  932. }
  933. public int compareByPrecedenceAndHierarchy(ResolvedType firstAspect, ResolvedType secondAspect) {
  934. if (firstAspect.equals(secondAspect)) return 0;
  935. int ret = compareByPrecedence(firstAspect, secondAspect);
  936. if (ret != 0) return ret;
  937. if (firstAspect.isAssignableFrom(secondAspect)) return -1;
  938. else if (secondAspect.isAssignableFrom(firstAspect)) return +1;
  939. return 0;
  940. }
  941. private static class PrecedenceCacheKey {
  942. public ResolvedType aspect1;
  943. public ResolvedType aspect2;
  944. public PrecedenceCacheKey(ResolvedType a1, ResolvedType a2) {
  945. this.aspect1 = a1;
  946. this.aspect2 = a2;
  947. }
  948. public boolean equals(Object obj) {
  949. if (!(obj instanceof PrecedenceCacheKey)) return false;
  950. PrecedenceCacheKey other = (PrecedenceCacheKey) obj;
  951. return (aspect1 == other.aspect1 && aspect2 == other.aspect2);
  952. }
  953. public int hashCode() {
  954. return aspect1.hashCode() + aspect2.hashCode();
  955. }
  956. }
  957. }
  958. public void validateType(UnresolvedType type) { }
  959. // --- with java5 we can get into a recursive mess if we aren't careful when resolving types (*cough* java.lang.Enum) ---
  960. // --- this first map is for java15 delegates which may try and recursively access the same type variables.
  961. // --- I would rather stash this against a reference type - but we don't guarantee referencetypes are unique for
  962. // so we can't :(
  963. private Map workInProgress1 = new HashMap();
  964. public TypeVariable[] getTypeVariablesCurrentlyBeingProcessed(Class baseClass) {
  965. return (TypeVariable[])workInProgress1.get(baseClass);
  966. }
  967. public void recordTypeVariablesCurrentlyBeingProcessed(Class baseClass, TypeVariable[] typeVariables) {
  968. workInProgress1.put(baseClass,typeVariables);
  969. }
  970. public void forgetTypeVariablesCurrentlyBeingProcessed(Class baseClass) {
  971. workInProgress1.remove(baseClass);
  972. }
  973. public void setAddSerialVerUID(boolean b) { addSerialVerUID=b;}
  974. public boolean isAddSerialVerUID() { return addSerialVerUID;}
  975. public void flush() {
  976. typeMap.expendableMap.clear();
  977. }
  978. public void ensureAdvancedConfigurationProcessed() {
  979. // Check *once* whether the user has switched asm support off
  980. if (!checkedAdvancedConfiguration) {
  981. Properties p = getExtraConfiguration();
  982. if (p!=null) {
  983. if (isASMAround) { // dont bother if its not...
  984. String s = p.getProperty(xsetACTIVATE_LIGHTWEIGHT_DELEGATES,"true");
  985. fastDelegateSupportEnabled = s.equalsIgnoreCase("true");
  986. if (!fastDelegateSupportEnabled)
  987. getMessageHandler().handleMessage(MessageUtil.info("[activateLightweightDelegates=false] Disabling optimization to use lightweight delegates for non-woven types"));
  988. }
  989. String s = p.getProperty(xsetRUN_MINIMAL_MEMORY,"false");
  990. runMinimalMemory = s.equalsIgnoreCase("true");
  991. // if (runMinimalMemory)
  992. // getMessageHandler().handleMessage(MessageUtil.info("[runMinimalMemory=true] Optimizing bcel processing (and cost of performance) to use less memory"));
  993. s = p.getProperty(xsetDEBUG_STRUCTURAL_CHANGES_CODE,"false");
  994. forDEBUG_structuralChangesCode = s.equalsIgnoreCase("true");
  995. s = p.getProperty(xsetDEBUG_BRIDGING,"false");
  996. forDEBUG_bridgingCode = s.equalsIgnoreCase("true");
  997. }
  998. checkedAdvancedConfiguration=true;
  999. }
  1000. }
  1001. public boolean isRunMinimalMemory() {
  1002. ensureAdvancedConfigurationProcessed();
  1003. return runMinimalMemory;
  1004. }
  1005. public void setFastDelegateSupport(boolean b) {
  1006. if (b && !isASMAround) {
  1007. throw new BCException("Unable to activate fast delegate support, ASM classes cannot be found");
  1008. }
  1009. fastDelegateSupportEnabled = b;
  1010. }
  1011. public boolean isFastDelegateSupportEnabled() {
  1012. ensureAdvancedConfigurationProcessed();
  1013. return fastDelegateSupportEnabled;
  1014. }
  1015. public void setIncrementalCompileCouldFollow(boolean b) {incrementalCompileCouldFollow = b;}
  1016. public boolean couldIncrementalCompileFollow() {return incrementalCompileCouldFollow;}
  1017. public void setSynchronizationPointcutsInUse() {synchronizationPointcutsInUse =true;}
  1018. public boolean areSynchronizationPointcutsInUse() {return synchronizationPointcutsInUse;}
  1019. }