private void parseClassAttributes(final Class klass, AspectDefinition aspectDef) {
if (klass == null) throw new IllegalArgumentException("class can not be null");
Object[] classAttributes = Attributes.getAttributes(klass);
for (int i = 0; i < classAttributes.length; i++) {
IntroduceAttribute introduceAttr = null;
if (classAttributes[i] instanceof IntroduceAttribute) {
introduceAttr = (IntroduceAttribute) classAttributes[i];
Class mixin = null;
try {
mixin = klass.getClassLoader().loadClass(introduceAttr.getInnerClassName());
} catch (ClassNotFoundException e) {
throw new WrappedRuntimeException(e);
}
Method[] methods = (Method[]) TransformationUtil.createSortedMethodList(mixin).toArray(new Method[]{});//gatherMixinSortedMethods(mixin, introduceAttr.getIntroducedInterfaceNames());
createAndAddIntroductionDefToAspectDef(
introduceAttr.getExpression(),
introduceAttr.getInnerClassName(),
introduceAttr.getIntroducedInterfaceNames(),
methods,
introduceAttr.getDeploymentModel(),
aspectDef
);
}
}
}