blob: aa1041d01929786cd97f69d19b140f3c4abf2734 [file] [log] [blame]
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.jack.load;
import com.android.jack.ir.ast.JAnnotationType;
import com.android.jack.ir.ast.JDefinedAnnotationType;
import com.android.jack.ir.ast.JDefinedClassOrInterface;
import com.android.jack.ir.ast.JType;
import com.android.sched.marker.Marker;
import com.android.sched.util.location.Location;
import com.android.sched.util.location.NoLocation;
import java.util.List;
import javax.annotation.Nonnull;
/**
* A {@link ClassOrInterfaceLoader} doing nothing.
*/
public class NopClassOrInterfaceLoader implements ClassOrInterfaceLoader {
@Nonnull
private static final NoLocation NO_LOCATION = new NoLocation();
@Nonnull
public static final ClassOrInterfaceLoader INSTANCE = new NopClassOrInterfaceLoader();
private NopClassOrInterfaceLoader() {
// Nothing to do
}
@Override
@Nonnull
public Location getLocation(@Nonnull JDefinedClassOrInterface loaded) {
return NO_LOCATION;
}
@Override
public void ensureHierarchy(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureMarkers(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureMarker(@Nonnull JDefinedClassOrInterface loaded,
@Nonnull Class<? extends Marker> cls) {
// Nothing to do
}
@Override
public void ensureEnclosing(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureInners(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureAnnotations(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureAnnotation(@Nonnull JDefinedClassOrInterface loaded,
@Nonnull JAnnotationType annotation) {
// Nothing to do
}
@Override
public void ensureMethods(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureMethod(@Nonnull JDefinedClassOrInterface loaded, @Nonnull String name,
@Nonnull List<? extends JType> args, @Nonnull JType returnType) {
// Nothing to do
}
@Override
public void ensureFields(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureFields(@Nonnull JDefinedClassOrInterface loaded, @Nonnull String fieldName) {
// Nothing to do
}
@Override
public void ensureModifier(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
@Override
public void ensureRetentionPolicy(@Nonnull JDefinedAnnotationType loaded) {
// Nothing to do
}
@Override
public void ensureSourceInfo(@Nonnull JDefinedClassOrInterface loaded) {
// Nothing to do
}
}