/* *******************************************************************
* Copyright (c) 2002 Contributors
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* Andy Clement - June 2005 - separated out from ResolvedType
* ******************************************************************/
package org.aspectj.weaver;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.util.GenericSignature;
import org.aspectj.util.GenericSignature.ClassSignature;
+import org.aspectj.util.GenericSignature.FormalTypeParameter;
import org.aspectj.util.GenericSignatureParser;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
this.exposedToWeaver = exposedToWeaver;
}
+ @Override
public final boolean isClass() {
return !isAspect() && !isInterface();
}
+ @Override
public boolean isCacheable() {
return false;
}
/**
* Designed to be overriden by EclipseType to disable collection of shadow mungers during pre-weave compilation phase
*/
+ @Override
public boolean doesNotExposeShadowMungers() {
return false;
}
+ @Override
public boolean isExposedToWeaver() {
return exposedToWeaver;
}
+ @Override
public ReferenceType getResolvedTypeX() {
return resolvedTypeX;
}
+ @Override
public final String getSourcefilename() {
return sourcefilename;
}
return getSourceContext().makeSourceLocation(0, 0);
}
+ @Override
public ISourceContext getSourceContext() {
return sourceContext;
}
if (outerClassType == null) {
return GenericSignature.FormalTypeParameter.NONE;
} else {
- throw new BCException("Whilst processing type '" + this.resolvedTypeX.getSignature()
- + "' - cannot cast the outer type to a reference type. Signature=" + outerClassType.getSignature()
- + " toString()=" + outerClassType.toString()+" class=" + outerClassType.getClassName());
+ if (System.getProperty("aspectj.debug565713","false").toLowerCase().equals("true")) {
+ System.out.println("DEBUG 565713: Whilst processing type '" + this.resolvedTypeX.getSignature()+
+ "' - cannot cast the outer type to a reference type. Signature=" + outerClassType.getSignature() +
+ " toString()=" + outerClassType.toString()+" class=" + outerClassType.getClassName());
+ return GenericSignature.FormalTypeParameter.NONE;
+ } else {
+ throw new BCException("Whilst processing type '" + this.resolvedTypeX.getSignature()
+ + "' - cannot cast the outer type to a reference type. Signature=" + outerClassType.getSignature()
+ + " toString()=" + outerClassType.toString()+" class=" + outerClassType.getClassName());
+ }
}
}
ReferenceType outer = (ReferenceType) outerClassType;
AbstractReferenceTypeDelegate outerObjectType = (AbstractReferenceTypeDelegate) outerDelegate;
if (outerObjectType.isNested()) {
GenericSignature.FormalTypeParameter[] parentParams = outerObjectType.getFormalTypeParametersFromOuterClass();
- for (int i = 0; i < parentParams.length; i++) {
- typeParameters.add(parentParams[i]);
+ for (FormalTypeParameter parentParam : parentParams) {
+ typeParameters.add(parentParam);
}
}
GenericSignature.ClassSignature outerSig = outerObjectType.getGenericClassTypeSignature();
if (outerSig != null) {
- for (int i = 0; i < outerSig.formalTypeParameters.length; i++) {
- typeParameters.add(outerSig.formalTypeParameters[i]);
+ for (FormalTypeParameter formalTypeParameter : outerSig.formalTypeParameters) {
+ typeParameters.add(formalTypeParameter);
}
}
return ret;
}
+ @Override
public boolean copySourceContext() {
return true;
}
+ @Override
public int getCompilerVersion() {
return WeaverVersionInfo.getCurrentWeaverMajorVersion();
}
+ @Override
public void ensureConsistent() {
}
+ @Override
public boolean isWeavable() {
return false;
}
+ @Override
public boolean hasBeenWoven() {
return false;
}