repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/servicecomb-java-chassis
1,076
foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestUInt64Schema.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.servicecomb.foundation.protobuf.internal.schema.scalar; public class TestUInt64Schema extends TestNumberBaseSchema { public TestUInt64Schema() { minValue = Long.MIN_VALUE; maxValue = Long.MAX_VALUE; initFields("uint64", "objUint64"); } }
apache/servicecomb-java-chassis
1,083
clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/model/CreateMicroserviceRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.servicecomb.service.center.client.model; public class CreateMicroserviceRequest { private Microservice service; public Microservice getService() { return service; } public void setService(Microservice service) { this.service = service; } }
apache/servicecomb-java-chassis
1,096
demo/demo-pojo/pojo-server/src/main/java/org/apache/servicecomb/demo/pojo/server/FlowControlClientSchema.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.servicecomb.demo.pojo.server; import org.apache.servicecomb.provider.pojo.RpcSchema; @RpcSchema(schemaId = "FlowControlClientSchema") public class FlowControlClientSchema { public int foo(int num) { return num; } public int bar(int num) { return num; } }
apache/servicecomb-java-chassis
1,110
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ExtensionsFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.servicecomb.loadbalance; /** * By implements ExtensionsFactory, users can add new extends for rules, filters, etc. */ public interface ExtensionsFactory { boolean isSupport(String key, String value); default RuleExt createLoadBalancerRule(String ruleName) { return null; } }
apache/servicecomb-toolkit
1,078
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/RequestBodyDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.RequestBodyDiffValidator; public interface RequestBodyDiffValidatorFactory extends OasObjectDiffValidatorFactory<RequestBodyDiffValidator> { }
apache/shenyu
1,126
shenyu-common/src/main/java/org/apache/shenyu/common/enums/PluginHandlerEventEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.shenyu.common.enums; /** * plugin handler event. */ public enum PluginHandlerEventEnum { /** * plugin enabled. */ ENABLED, /** * plugin disabled. */ DISABLED, /** * plugin deleted. */ DELETE, /** * plugin sorted. */ SORTED }
apache/shiro
1,160
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ /** * Cryptographic Hashing components that greatly simplify one-way data hashing in an application. * <p/> * The {@link org.apache.shiro.crypto.hash.Hash Hash} interface and its implementations are significantly * easier to understand and use compared to the JDK's <code>MessageDigest</code> mechanism. */ package org.apache.shiro.crypto.hash;
apache/shiro
1,174
core/src/main/java/org/apache/shiro/dao/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 containing various components useful when building Data Access Objects (DAOs), including a generic * Data Access Exception hierarchy. As {@link org.apache.shiro.realm.Realm Realm} instances are typically viewed as * security-specific DAOs, this package is often useful when implementing Realms. * * @since 1.2 */ package org.apache.shiro.dao;
apache/skywalking-java
1,099
apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/comm/Constants.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.skywalking.apm.plugin.gson.comm; import org.apache.skywalking.apm.agent.core.context.tag.AbstractTag; import org.apache.skywalking.apm.agent.core.context.tag.Tags; public class Constants { public static final AbstractTag<String> LENGTH_TAG = Tags.ofKey("length"); }
apache/skywalking-java
1,114
apm-protocol/apm-network/src/main/java/org/apache/skywalking/apm/network/trace/component/Component.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.skywalking.apm.network.trace.component; /** * The <code>Component</code> represents component library, which has been supported by skywalking sniffer. * <p> * The supported list is in {@link ComponentsDefine}. */ public interface Component { int getId(); String getName(); }
apache/skywalking
1,080
oap-server/server-receiver-plugin/aws-firehose-receiver/src/main/java/org/apache/skywalking/oap/server/receiver/aws/firehose/FirehoseReq.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.skywalking.oap.server.receiver.aws.firehose; import java.util.List; import lombok.Getter; import lombok.Setter; @Getter @Setter public class FirehoseReq { private String requestId; private Long timestamp; private List<RequestData> records; }
apache/solr
1,148
solr/api/src/java/org/apache/solr/client/api/model/ReloadCollectionRequestBody.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.solr.client.api.model; import static org.apache.solr.client.api.model.Constants.ASYNC; import com.fasterxml.jackson.annotation.JsonProperty; // TODO Is it worth having this in a request body, or should we just make it a query param? public class ReloadCollectionRequestBody { @JsonProperty(ASYNC) public String async; }
apache/solr
1,162
solr/core/src/java/org/apache/solr/jersey/APIConfigProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.solr.jersey; import org.apache.solr.jersey.APIConfigProvider.APIConfig; /** * Interface to be implemented by the Request Handlers that need to provide some custom * configuration to the V2 APIs */ public interface APIConfigProvider<T extends APIConfig> { T provide(); Class<T> getConfigClass(); public interface APIConfig {} }
apache/solr
1,169
solr/core/src/java/org/apache/solr/util/LocaleUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.solr.util; import java.util.Locale; import org.apache.solr.common.util.SuppressForbidden; /** */ public class LocaleUtils { private LocaleUtils() {} @SuppressForbidden(reason = "Needs to use commons-lang3 LocaleUtils") public static Locale toLocale(String locale) { return org.apache.commons.lang3.LocaleUtils.toLocale(locale); } }
apache/stratos
1,088
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/ApplicationCreatedEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.stratos.messaging.listener.application; import org.apache.stratos.messaging.listener.EventListener; /** * This listener will get triggered upon the application created event. */ public abstract class ApplicationCreatedEventListener extends EventListener { }
apache/stratos
1,088
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/ApplicationDeletedEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.stratos.messaging.listener.application; import org.apache.stratos.messaging.listener.EventListener; /** * This listener will get triggered upon the application deleted event. */ public abstract class ApplicationDeletedEventListener extends EventListener { }
apache/stratos
1,141
components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Main.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.stratos.cli; /** * CLI main class. */ public class Main { /** * Main executable method used to call from CLI. */ public static void main(final String[] args) { CliTool cliTool = new CliTool(); cliTool.createConfigDirectory(); cliTool.handleConsoleInputs(args); } }
apache/streampipes
1,103
streampipes-integration-tests/src/test/java/org/apache/streampipes/integration/containers/KafkaDevContainer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.streampipes.integration.containers; public class KafkaDevContainer extends SpKafkaTestContainer { @Override public void start() { // do nothing } public String getBrokerHost() { return "localhost"; } public Integer getBrokerPort() { return 9093; } }
apache/streampipes
1,115
streampipes-data-explorer-api/src/main/java/org/apache/streampipes/dataexplorer/api/ITimeSeriesStorage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.streampipes.dataexplorer.api; import org.apache.streampipes.commons.exceptions.SpRuntimeException; import org.apache.streampipes.model.runtime.Event; public interface ITimeSeriesStorage { void onEvent(Event event) throws SpRuntimeException; void close() throws SpRuntimeException; }
apache/submarine
1,075
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/experiment/codelocalizer/CodeLocalizer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.submarine.server.submitter.k8s.experiment.codelocalizer; import io.kubernetes.client.openapi.models.V1PodSpec; public interface CodeLocalizer { /** * Create K8's Init container to sync the code */ void localize(V1PodSpec podSpec); }
apache/syncope
1,126
client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/ImplementationLookup.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.syncope.client.ui.commons; import java.io.Serializable; import org.apache.syncope.client.ui.commons.markup.html.form.preview.BinaryPreviewer; public interface ImplementationLookup extends Serializable { void load(); Class<? extends BinaryPreviewer> getPreviewerClass(String mimeType); }
apache/systemds
1,137
src/main/java/org/apache/sysds/runtime/functionobjects/TernaryValueFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.sysds.runtime.functionobjects; public abstract class TernaryValueFunction extends ValueFunction { private static final long serialVersionUID = 4837616587192612216L; public abstract double execute ( double in1, double in2, double in3 ); public abstract ValueFunction setOp2Constant(double cnt); }
apache/tomcat
1,168
java/org/apache/catalina/loader/ResourceEntry.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.catalina.loader; /** * Resource entry. */ public class ResourceEntry { /** * The "last modified" time of the origin file at the time this resource was loaded, in milliseconds since the * epoch. */ public long lastModified = -1; /** * Loaded class. */ public volatile Class<?> loadedClass = null; }
apache/tomcat80
1,162
modules/bayeux/java/org/apache/cometd/bayeux/SecurityPolicy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.cometd.bayeux; /** * @author Greg Wilkins */ public interface SecurityPolicy { boolean canHandshake(Message message); boolean canCreate(Client client,String channel,Message message); boolean canSubscribe(Client client,String channel,Message messsage); boolean canPublish(Client client,String channel,Message messsage); }
apache/tomee
1,136
server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClusterableRequestHandler.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.openejb.server.ejbd; import org.apache.openejb.BeanContext; import org.apache.openejb.client.ClusterableRequest; import org.apache.openejb.client.ClusterableResponse; public interface ClusterableRequestHandler { void updateServer(BeanContext beanContext, ClusterableRequest req, ClusterableResponse res); }
apache/tomee
1,143
examples/simple-rest/src/main/java/org/superbiz/rest/GreetingService.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.superbiz.rest; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.Path; @Path("/greeting") public class GreetingService { @GET public String message() { return "Hi REST!"; } @POST public String lowerCase(final String message) { return "Hi REST!".toLowerCase(); } }
apache/tomee
1,145
server/openejb-client/src/main/java/org/apache/openejb/client/EJBObjectProxy.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.openejb.client; import java.io.ObjectStreamException; import java.io.Serializable; public interface EJBObjectProxy extends Serializable { public EJBObjectHandler getEJBObjectHandler(); public Object writeReplace() throws ObjectStreamException; public Object readResolve() throws ObjectStreamException; }
apache/tomee
1,152
container/openejb-core/src/main/java/org/apache/openejb/junit/Component.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.openejb.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Deprecated // use org.apache.openejb.testing.Component public @interface Component { }
apache/wicket
1,129
wicket-examples/src/main/java/org/apache/wicket/examples/compref/MyBorder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.wicket.examples.compref; import org.apache.wicket.markup.html.border.Border; /** * A sample panel component. * * @author Eelco Hillenius */ public class MyBorder extends Border { /** * Construct. * * @param id * component id */ public MyBorder(String id) { super(id); } }
apache/wicket
1,136
wicket-core/src/main/java/org/apache/wicket/ajax/AjaxRequestTargetListenerCollection.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.wicket.ajax; import org.apache.wicket.util.listener.ListenerCollection; /** * A collection of {@link AjaxRequestTarget.IListener}s * * @since 1.5 */ public class AjaxRequestTargetListenerCollection extends ListenerCollection<AjaxRequestTarget.IListener> { private static final long serialVersionUID = 1L; }
google/binnavi
1,104
src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/replies/DebuggerClosedUnexpectedlyReply.java
// Copyright 2011-2016 Google LLC // // 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.google.security.zynamics.binnavi.debug.connection.packets.replies; /** * Reply type that is dispatched whenever the connection to the debugger closed unexpectedly. This * reply is not a real reply sent by the debug client but a "fake" reply dispatched by BinNavi * whenever necessary. */ public final class DebuggerClosedUnexpectedlyReply extends DebuggerReply { /** * Creates a new debugger closed unexpectedly reply. */ public DebuggerClosedUnexpectedlyReply() { super(0, 0); } }
google/binnavi
1,133
src/main/java/com/google/security/zynamics/binnavi/Gui/GraphWindows/Loader/IParser.java
// Copyright 2011-2016 Google LLC // // 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.google.security.zynamics.binnavi.Gui.GraphWindows.Loader; import java.text.ParseException; /** * Interface for classes that convert settings strings into enumeration values. * * @param <T> Type of the returned enumeration value. */ public interface IParser<T> { /** * Parses a numerical identifier. * * @param value The integer value to parse. * * @return The corresponding enum value. * * @throws ParseException Thrown if the input value is invalid. */ T parse(int value) throws ParseException; }
google/closure-compiler
1,137
src/com/google/javascript/jscomp/parsing/parser/trees/DynamicImportTree.java
/* * Copyright 2019 The Closure Compiler Authors. * * 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.google.javascript.jscomp.parsing.parser.trees; import com.google.javascript.jscomp.parsing.parser.util.SourceRange; /** * Represents a dynamic import expression. * * <p>e.g. `import(myModuleName)` in `const modulePromise = import(myModuleName)`. */ public class DynamicImportTree extends ParseTree { public final ParseTree argument; public DynamicImportTree(SourceRange location, ParseTree argument) { super(ParseTreeType.DYNAMIC_IMPORT_EXPRESSION, location); this.argument = argument; } }
google/closure-templates
1,158
java/src/com/google/template/soy/passes/RunBefore.java
/* * Copyright 2020 Google Inc. * * 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.google.template.soy.passes; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; /** * Documents the passes this pass should run before. * * <p>Use this when you rely on the given pass performing some kind of mutation on the AST structure * you are producing. For example, a desugaring pass which creates new ExprNodes might want to run * before type checking so it doesn't have to populate type fields. */ @Retention(RUNTIME) @interface RunBefore { Class<? extends CompilerPass>[] value(); }
google/graphicsfuzz
1,134
generator/src/main/java/com/graphicsfuzz/generator/util/RemoveReturnStatements.java
/* * Copyright 2018 The GraphicsFuzz Project Authors * * 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 * * https://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.graphicsfuzz.generator.util; import com.graphicsfuzz.common.ast.IAstNode; import com.graphicsfuzz.common.ast.stmt.ExprStmt; import com.graphicsfuzz.common.ast.stmt.ReturnStmt; public class RemoveReturnStatements extends RemoveStatements { public RemoveReturnStatements(IAstNode node) { super(item -> item instanceof ReturnStmt, item -> ((ReturnStmt) item).hasExpr() ? new ExprStmt(((ReturnStmt) item).getExpr()) : makeIntConstantExprStmt(), node); } }
google/guava
1,158
android/guava/src/com/google/common/collect/IgnoreJRERequirement.java
/* * Copyright 2019 The Guava Authors * * 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.google.common.collect; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/guava
1,158
android/guava/src/com/google/common/reflect/IgnoreJRERequirement.java
/* * Copyright 2019 The Guava Authors * * 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.google.common.reflect; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/guava
1,158
guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java
/* * Copyright 2019 The Guava Authors * * 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.google.common.testing; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/j2cl
1,143
transpiler/javatests/com/google/j2cl/transpiler/SourceMapsIntegrationTest.java
/* * Copyright 2017 Google Inc. * * 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.google.j2cl.transpiler; import static com.google.j2cl.transpiler.TranspilerTester.newTesterWithDefaults; import junit.framework.TestCase; /** Tests related to sourcemap processing. */ public class SourceMapsIntegrationTest extends TestCase { public void testNoNewlineAtEndSourceFile() throws Exception { newTesterWithDefaults() .addFile("test/NoNewLineAtEnd.java", "package test; public class NoNewLineAtEnd {}") .addArgs("-readablesourcemaps") .assertTranspileSucceeds() .assertNoWarnings(); } }
google/nomulus
1,133
core/src/main/java/google/registry/model/domain/fee11/FeeRenewResponseExtensionV11.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // 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 google.registry.model.domain.fee11; import google.registry.model.domain.fee.FeeTransformResponseExtension; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; /** * An XML data object that represents a fee extension that may be present on the response to EPP * domain renew commands. */ @XmlRootElement(name = "renData") @XmlType(propOrder = {"currency", "fees", "credits"}) public class FeeRenewResponseExtensionV11 extends FeeTransformResponseExtension {}
google/nomulus
1,133
core/src/main/java/google/registry/model/domain/fee12/FeeRenewResponseExtensionV12.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // 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 google.registry.model.domain.fee12; import google.registry.model.domain.fee.FeeTransformResponseExtension; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; /** * An XML data object that represents a fee extension that may be present on the response to EPP * domain renew commands. */ @XmlRootElement(name = "renData") @XmlType(propOrder = {"currency", "fees", "credits"}) public class FeeRenewResponseExtensionV12 extends FeeTransformResponseExtension {}
googleapis/google-cloud-java
1,039
java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1/src/main/java/com/google/shopping/merchant/datasources/v1/MerchantReviewDataSourceOrBuilder.java
/* * Copyright 2025 Google LLC * * 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/shopping/merchant/datasources/v1/datasourcetypes.proto // Protobuf Java Version: 3.25.8 package com.google.shopping.merchant.datasources.v1; public interface MerchantReviewDataSourceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.shopping.merchant.datasources.v1.MerchantReviewDataSource) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,044
java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/DisableInteractiveSerialConsoleResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/baremetalsolution/v2/instance.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.baremetalsolution.v2; public interface DisableInteractiveSerialConsoleResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,045
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/ExportInsightsDataResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface ExportInsightsDataResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,045
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/UndeployIssueModelResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface UndeployIssueModelResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,049
java-telcoautomation/proto-google-cloud-telcoautomation-v1alpha1/src/main/java/com/google/cloud/telcoautomation/v1alpha1/DiscardDeploymentChangesResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/telcoautomation/v1alpha1/telcoautomation.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.telcoautomation.v1alpha1; public interface DiscardDeploymentChangesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.telcoautomation.v1alpha1.DiscardDeploymentChangesResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,053
java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BatchVerifyTargetSitesResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.discoveryengine.v1alpha; public interface BatchVerifyTargetSitesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesResponse) com.google.protobuf.MessageOrBuilder {}
googleworkspace/java-samples
1,153
drive/snippets/drive_v2/src/test/java/TestListAppdata.java
// Copyright 2022 Google LLC // // 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 // // https://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. import static org.junit.Assert.assertNotEquals; import com.google.api.services.drive.model.FileList; import java.io.IOException; import java.security.GeneralSecurityException; import org.junit.Test; // Unit test class for testing of ListAppData snippet public class TestListAppdata extends BaseTest { @Test public void listAppData() throws IOException, GeneralSecurityException { String id = UploadAppData.uploadAppData(); deleteFileOnCleanup(id); FileList files = ListAppData.listAppData(); assertNotEquals(0, files.getItems().size()); } }
hibernate/hibernate-ogm
1,109
core/src/main/java/org/hibernate/ogm/hibernatecore/impl/OgmSharedSessionBuilderDelegator.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.hibernatecore.impl; import org.hibernate.SharedSessionBuilder; import org.hibernate.engine.spi.AbstractDelegatingSharedSessionBuilder; import org.hibernate.event.spi.EventSource; import org.hibernate.ogm.OgmSession; import org.hibernate.ogm.OgmSessionFactory; /** * @author Emmanuel Bernard &lt;emmanuel@hibernate.org&gt; */ public class OgmSharedSessionBuilderDelegator extends AbstractDelegatingSharedSessionBuilder<SharedSessionBuilder> { private final SharedSessionBuilder builder; private final OgmSessionFactory factory; public OgmSharedSessionBuilderDelegator(SharedSessionBuilder builder, OgmSessionFactory factory) { super( builder ); this.builder = builder; this.factory = factory; } @Override public OgmSession openSession() { return new OgmSessionImpl( factory, (EventSource) builder.openSession() ); } }
hibernate/hibernate-orm
1,077
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/Order.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.manytoone; import java.io.Serializable; import java.util.Set; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; /** * @author Emmanuel Bernard */ @Entity @Table(name="ORDERS") public class Order implements Serializable { private Integer id; private String orderNbr; private Set<OrderLine> orderLines; @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name="order_nbr") public String getOrderNbr() { return orderNbr; } public void setOrderNbr(String orderNbr) { this.orderNbr = orderNbr; } @OneToMany(mappedBy = "order") public Set<OrderLine> getOrderLines() { return orderLines; } public void setOrderLines(Set<OrderLine> orderLines) { this.orderLines = orderLines; } }
hibernate/hibernate-orm
1,082
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PreUpdateJpaAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.models.spi.ModelsContext; import jakarta.persistence.PreUpdate; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class PreUpdateJpaAnnotation implements PreUpdate { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public PreUpdateJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public PreUpdateJpaAnnotation(PreUpdate annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public PreUpdateJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return PreUpdate.class; } }
hibernate/hibernate-orm
1,082
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/TransientJpaAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.models.spi.ModelsContext; import jakarta.persistence.Transient; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class TransientJpaAnnotation implements Transient { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public TransientJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public TransientJpaAnnotation(Transient annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public TransientJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return Transient.class; } }
hibernate/hibernate-orm
1,095
hibernate-scan-jandex/src/main/java/org/hibernate/archive/scan/spi/NonClassFileArchiveEntryHandler.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.archive.scan.spi; import org.hibernate.archive.scan.internal.MappingFileDescriptorImpl; import org.hibernate.archive.scan.internal.ScanResultCollector; import org.hibernate.boot.archive.spi.ArchiveContext; import org.hibernate.boot.archive.spi.ArchiveEntry; import org.hibernate.boot.archive.spi.ArchiveEntryHandler; /** * Defines handling and filtering for all non-class file (package-info is also a class file...) entries within an archive * * @author Steve Ebersole */ public class NonClassFileArchiveEntryHandler implements ArchiveEntryHandler { private final ScanResultCollector resultCollector; public NonClassFileArchiveEntryHandler(ScanResultCollector resultCollector) { this.resultCollector = resultCollector; } @Override public void handleEntry(ArchiveEntry entry, ArchiveContext context) { resultCollector.handleMappingFile( new MappingFileDescriptorImpl( entry.getNameWithinArchive(), entry.getStreamAccess() ), context.isRootUrl() ); } }
hibernate/hibernate-orm
1,122
hibernate-core/src/main/java/org/hibernate/boot/model/internal/PrimitiveArrayBinder.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.model.internal; import java.util.function.Supplier; import org.hibernate.boot.spi.MetadataBuildingContext; import org.hibernate.mapping.Collection; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PrimitiveArray; import org.hibernate.resource.beans.spi.ManagedBean; import org.hibernate.usertype.UserCollectionType; /** * A {@link CollectionBinder} for {@link org.hibernate.collection.spi.PersistentArrayHolder primitive arrays}, * whose mapping model type is {@link org.hibernate.mapping.PrimitiveArray}. * * @author Emmanuel Bernard */ public class PrimitiveArrayBinder extends ArrayBinder { public PrimitiveArrayBinder(Supplier<ManagedBean<? extends UserCollectionType>> customTypeBeanResolver, MetadataBuildingContext buildingContext) { super( customTypeBeanResolver, buildingContext ); } @Override protected Collection createCollection(PersistentClass owner) { return new PrimitiveArray( getCustomTypeBeanResolver(), owner, getBuildingContext() ); } }
hibernate/hibernate-search
1,095
engine/src/main/java/org/hibernate/search/engine/search/sort/dsl/impl/WithParametersSortFinalStep.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.search.sort.dsl.impl; import java.util.function.Function; import org.hibernate.search.engine.search.common.NamedValues; import org.hibernate.search.engine.search.sort.SearchSort; import org.hibernate.search.engine.search.sort.dsl.SortFinalStep; import org.hibernate.search.engine.search.sort.dsl.spi.AbstractSortThenStep; import org.hibernate.search.engine.search.sort.dsl.spi.SearchSortDslContext; import org.hibernate.search.engine.search.sort.spi.WithParametersSortBuilder; public class WithParametersSortFinalStep<SR> extends AbstractSortThenStep<SR> { private final WithParametersSortBuilder builder; public WithParametersSortFinalStep(SearchSortDslContext<SR, ?, ?> dslContext, Function<? super NamedValues, ? extends SortFinalStep> sortCreator) { super( dslContext ); builder = dslContext.scope().sortBuilders().withParameters(); builder.creator( sortCreator ); } @Override protected SearchSort build() { return builder.build(); } }
hibernate/hibernate-tools
1,090
gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/TutorialTest.java
package org.hibernate.tool.gradle; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.File; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.hibernate.tool.it.gradle.TestTemplate; public class TutorialTest extends TestTemplate { @BeforeEach public void beforeEach() { setGradleTaskToPerform("generateJava"); setDatabaseCreationScript(new String[] { "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))" }); } @Test public void testTutorial() throws Exception { createProjectAndExecuteGradleCommand(); File generatedOutputFolder = new File(getProjectDir(), "app/generated-sources"); assertTrue(generatedOutputFolder.exists()); assertTrue(generatedOutputFolder.isDirectory()); assertEquals(1, generatedOutputFolder.list().length); File generatedPersonJavaFile = new File(generatedOutputFolder, "Person.java"); assertTrue(generatedPersonJavaFile.exists()); assertTrue(generatedPersonJavaFile.isFile()); } }
openjdk/jdk8
1,157
langtools/test/tools/javac/diags/examples/IntfAnnotationsCantHaveParams.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.intf.annotation.members.cant.have.params @interface X { String value(int i); }
openjdk/jdk8
1,159
langtools/test/tools/javac/lambda/MethodReference51.java
/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * certain cases of erroneous member reference lookup are not handled by Attr.visitReference * @compile/fail/ref=MethodReference51.out -XDrawDiagnostics MethodReference51.java */ class MethodReference51 { private static class Foo { static int j(int i) { return i; } } static Foo foo = new Foo(); static void m(String s) { } static void m(Integer i) { } static int f(String s) { return 1; } static int g(Integer i, Number n) { return 1; } static int g(Number n, Integer i) { return 1; } int h(int i) { return i; } } class TestMethodReference51 { interface IntSam { int m(int i); } interface IntegerIntegerSam { int m(Integer i1, Integer i2); } static void test() { IntSam s1 = MethodReference51::unknown; //fail IntSam s2 = MethodReference51::f; //fail IntSam s3 = MethodReference51::g; //fail IntegerIntegerSam s4 = MethodReference51::g; //fail IntSam s5 = MethodReference51::h; //fail IntSam s6 = MethodReference51.foo::j; //fail } }
openjdk/jdk8
1,165
langtools/test/tools/javac/diags/examples/IllegalComboModifiers.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.illegal.combination.of.modifiers class IllegalComboModifiers { public private int x; }
openjdk/jdk8
1,166
langtools/test/com/sun/javadoc/testCmndLineClass/pkg1/C2.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg1; /** *This is a description for C2. */ public class C2 { public static final int I = 1; }
openjdk/jdk8
1,166
langtools/test/com/sun/javadoc/testCmndLineClass/pkg2/C3.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg2; /** *This is a description for C3. */ public class C3 { public static final int I = 1; }
openjdk/jdk8
1,166
langtools/test/com/sun/javadoc/testCmndLineClass/pkg2/C4.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg2; /** *This is a description for C4. */ public class C4 { public static final int I = 1; }
openjdk/jdk8
1,168
langtools/test/tools/javac/diags/examples/EnumNoFinalize.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.enum.no.finalize enum EnumNoFinalize { A, B, C; public void finalize() { } }
openjdk/jdk8
1,170
langtools/test/tools/javac/diags/examples/NoSuperclass.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.no.superclass package java.lang; class Object { public Object() { super(); } }
openjdk/jdk8
1,180
langtools/test/tools/javac/unicode/FirstChar2.java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ \u0070ublic class FirstChar2 { public static void main(String[] args) { System.out.println("Hello world!"); } }
openjdk/jdk8
1,186
jdk/test/sun/rmi/rmic/classFileVersion/G1.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.rmi.Remote; import java.rmi.RemoteException; public interface G1 extends Remote { void m() throws RemoteException; }
openjdk/jdk8
1,189
langtools/test/tools/javadoc/imports/I.java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // The following imported class is bogus, but should still be returned // when inquired of. import bo.o.o.o.Gus; public interface I { }
openjdk/skara
1,176
webrev/src/main/java/org/openjdk/skara/webrev/View.java
/* * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.skara.webrev; import java.io.*; interface View { void render(Writer w) throws IOException; }
oracle/coherence-operator
1,121
examples/200_autoscaler/src/main/java/com/oracle/coherence/examples/HeapUsageMBean.java
/* * Copyright (c) 2020, 2021, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.examples; import com.tangosol.net.management.annotation.Description; import com.tangosol.net.management.annotation.MetricsValue; /** * A custom MBean interface to track heap usage that Coherence will publish as a metric. * * @author Jonathan Knight 2020.09.01 */ public interface HeapUsageMBean { /** * Obtain the amount of heap in use after the last GC. * * @return the amount of heap (in bytes) in use after the last GC */ @MetricsValue @Description("The total heap in use after the last GC") long getUsed(); /** * Obtain the amount of heap in use after the last GC as a percentage of the maximum heap. * * @return the amount of heap in use after the last GC as a percentage of the maximum heap */ @MetricsValue @Description("The total heap in use as after the last GC a percentage of the maximum heap") double getPercentageUsed(); }
oracle/coherence
1,131
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Anewarray.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.assembler; import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; /** * The ANEWARRAY op creates an array of references of a type specified by the * ClassConstant. * <p><code><pre> * JASM op : ANEWARRAY (0xbd) * JVM byte code(s): ANEWARRAY (0xbd) * Details : * </pre></code> * * @version 0.50, 06/15/98, assembler/dis-assembler * @author Cameron Purdy */ public class Anewarray extends OpConst implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. * * @param constant the ClassConstant */ public Anewarray(ClassConstant constant) { super(ANEWARRAY, constant); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "Anewarray"; }
oracle/coherence
1,140
prj/coherence-core/src/main/java/com/tangosol/io/pof/PofConfigProvider.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.tangosol.io.pof; import java.util.Collections; import java.util.Set; /** * A provider of POF configuration URIs to load into a {@link ConfigurablePofContext}. * <p> * Implementations of this class are discovered using the {@link java.util.ServiceLoader} * and supplied POF configurations automatically loaded. * * @author Jonathan Knight 2022.06.03 * @since 22.06 */ public interface PofConfigProvider { /** * Provide a POF configuration files to load. * * @return a POF configuration files to load */ String getConfigURI(); /** * Provide a set of POF configuration files to load. * * @return a set of POF configuration files to load */ default Set<String> getConfigURIs() { String sURI = getConfigURI(); return sURI == null || sURI.isBlank() ? Collections.emptySet() : Collections.singleton(sURI.trim()); } }
apache/cxf
1,125
rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/MyObject.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.cxf.microprofile.client.mock; public class MyObject { private String name; private int id; public MyObject(String name, int id) { this.name = name; this.id = id; } @Override public String toString() { return "name=\"" + name + "\" : id=" + id; } }
apache/cxf
1,133
systests/transports/src/test/java/org/apache/cxf/systest/http/timeout/DelayedServiceImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.cxf.systest.http.timeout; public class DelayedServiceImpl implements DelayedService { public String delay(long delay) { try { Thread.sleep(delay); } catch (InterruptedException ex) { /* do nothing */ } return "Replied after " + delay + "ms"; } }
apache/cxf
1,148
systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/types/BarAdapter.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.cxf.systest.jaxws.types; import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class BarAdapter extends XmlAdapter<BarImpl, Bar> { public BarImpl marshal(Bar v) throws Exception { return new BarImpl(v.getName()); } public Bar unmarshal(BarImpl v) throws Exception { return v; } }
apache/drill
1,151
exec/rpc/src/main/java/org/apache/drill/exec/rpc/EncryptionContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.drill.exec.rpc; public interface EncryptionContext { boolean isEncryptionEnabled(); void setEncryption(boolean encryptionEnabled); void setMaxWrappedSize(int maxWrappedChunkSize); int getMaxWrappedSize(); void setWrapSizeLimit(int wrapSizeLimit); int getWrapSizeLimit(); String getEncryptionCtxtString(); }
apache/druid
1,127
processing/src/main/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.druid.java.util.common.concurrent; import java.util.concurrent.ScheduledExecutorService; public interface ScheduledExecutorFactory { ScheduledExecutorService create( @SuppressWarnings("unused") /* intellij-inspect bug with lambda usages */ int corePoolSize, String nameFormat ); }
apache/druid
1,129
multi-stage-query/src/test/java/org/apache/druid/msq/input/table/SegmentWithDescriptorTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.druid.msq.input.table; import nl.jqno.equalsverifier.EqualsVerifier; import org.junit.Test; public class SegmentWithDescriptorTest { @Test public void testEquals() { EqualsVerifier.forClass(SegmentWithDescriptor.class) .usingGetClass() .verify(); } }
apache/eventmesh
1,117
eventmesh-admin-server/src/main/java/org/apache/eventmesh/admin/server/web/service/position/PositionHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.eventmesh.admin.server.web.service.position; import org.apache.eventmesh.common.remote.datasource.DataSourceType; public abstract class PositionHandler implements IReportPositionHandler, IFetchPositionHandler, IRecordPositionHandler { protected abstract DataSourceType getSourceType(); }
apache/fineract
1,108
fineract-provider/src/main/java/org/apache/fineract/portfolio/self/device/api/DeviceRegistrationApiConstants.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.fineract.portfolio.self.device.api; public final class DeviceRegistrationApiConstants { private DeviceRegistrationApiConstants() { } public static final String clientIdParamName = "clientId"; public static final String registrationIdParamName = "registrationId"; }
apache/flink-cdc
1,072
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/table/StartupMode.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.flink.cdc.connectors.mysql.table; /** * Startup modes for the MySQL CDC Consumer. * * @see StartupOptions */ public enum StartupMode { INITIAL, EARLIEST_OFFSET, LATEST_OFFSET, SPECIFIC_OFFSETS, TIMESTAMP, SNAPSHOT }
apache/flink-kubernetes-operator
1,100
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/metrics/CustomResourceMetrics.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.flink.kubernetes.operator.metrics; import io.fabric8.kubernetes.client.CustomResource; /** Custom resource metric type. */ public interface CustomResourceMetrics<CR extends CustomResource<?, ?>> { void onUpdate(CR customResource); void onRemove(CR customResource); }
apache/flink-statefun
1,098
statefun-flink/statefun-flink-io-bundle/src/main/java/org/apache/flink/statefun/sdk/kafka/KafkaIngressBuilderApiExtension.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.flink.statefun.sdk.kafka; public class KafkaIngressBuilderApiExtension { public static <T> void withDeserializer( KafkaIngressBuilder<T> kafkaIngressBuilder, KafkaIngressDeserializer<T> deserializer) { kafkaIngressBuilder.withDeserializer(deserializer); } }
apache/flink
1,129
flink-rpc/flink-rpc-core/src/main/java/org/apache/flink/runtime/rpc/messages/FencedMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.flink.runtime.rpc.messages; import java.io.Serializable; /** * Interface for fenced messages. * * @param <F> type of the fencing token * @param <P> type of the payload */ public interface FencedMessage<F extends Serializable, P> extends Message { F getFencingToken(); P getPayload(); }
apache/fory
1,140
java/fory-format/src/main/java/org/apache/fory/format/encoder/GeneratedArrayEncoder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.fory.format.encoder; import org.apache.fory.builder.Generated; import org.apache.fory.format.row.binary.BinaryArray; /** A list container row format codec for java bean. */ public interface GeneratedArrayEncoder extends Generated { BinaryArray toArray(Object obj); Object fromArray(BinaryArray array); }
apache/geode
1,135
geode-junit/src/main/java/org/apache/geode/test/junit/rules/serializable/FieldsOfTimeout.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You 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 org.apache.geode.test.junit.rules.serializable; /** * Names of member fields in {@link org.junit.rules.Timeout}. */ interface FieldsOfTimeout { String FIELD_TIMEOUT = "timeout"; // long String FIELD_TIME_UNIT = "timeUnit"; // java.util.concurrent.TimeUnit String FIELD_LOOK_FOR_STUCK_THREAD = "lookForStuckThread"; // boolean }
apache/geode
1,141
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/InternalLuceneService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to you 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 org.apache.geode.cache.lucene.internal; import org.apache.geode.cache.Cache; import org.apache.geode.cache.lucene.LuceneService; import org.apache.geode.internal.cache.CacheService; import org.apache.geode.internal.cache.extension.Extension; public interface InternalLuceneService extends LuceneService, Extension<Cache>, CacheService { }
apache/giraph
1,144
giraph-core/src/main/java/org/apache/giraph/types/FloatToFloatWritableWrapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.giraph.types; import org.apache.hadoop.io.FloatWritable; /** * Converts Floats to FloatWritables */ public class FloatToFloatWritableWrapper implements WritableWrapper<FloatWritable, Float> { @Override public void wrap(Float javaValue, FloatWritable writableValue) { writableValue.set(javaValue); } }
apache/hadoop
1,114
hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/object/tos/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ /** * Classes for hadoop-tos tos. */ @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"}) @InterfaceStability.Evolving package org.apache.hadoop.fs.tosfs.object.tos; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,129
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TracingHeaderFormat.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.hadoop.fs.azurebfs.utils; public enum TracingHeaderFormat { SINGLE_ID_FORMAT, // <client-req-id> TWO_ID_FORMAT, // <correlation-id>:<client-req-id> ALL_ID_FORMAT; // <client-correlation-id>:<client-req-id>:<filesystem-id> // :<primary-req-id>:<stream-id>:<hdfs-operation>:<retry-count> }
apache/harmony
1,152
classlib/modules/swing/src/main/java/common/javax/swing/ListModel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ /** * @author Sergey Burlak */ package javax.swing; import javax.swing.event.ListDataListener; public interface ListModel { public void addListDataListener(final ListDataListener l); public Object getElementAt(final int index); public int getSize(); public void removeListDataListener(final ListDataListener l); }
apache/helix
1,137
metrics-common/src/main/java/org/apache/helix/monitoring/mbeans/MonitorDomainNames.java
package org.apache.helix.monitoring.mbeans; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ /** * This enum defines all of domain names used with various Helix monitor mbeans. */ public enum MonitorDomainNames { ClusterStatus, HelixZkClient, HelixThreadPoolExecutor, HelixCallback, RoutingTableProvider, CLMParticipantReport, Rebalancer, AggregatedView }
apache/hertzbeat
1,089
hertzbeat-collector/hertzbeat-collector-basic/src/test/java/org/apache/hertzbeat/collector/collect/database/JdbcSpiLoaderTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.hertzbeat.collector.collect.database; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; /** * Test case for {@link JdbcSpiLoader} */ class JdbcSpiLoaderTest { @BeforeEach void setUp() { } @Test void run() { } }
apache/hop
1,146
engine/src/main/java/org/apache/hop/core/auth/core/IAuthenticationConsumerFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.hop.core.auth.core; public interface IAuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> { Class<ConsumedType> getConsumedType(); Class<ReturnType> getReturnType(); Class<CreateArgType> getCreateArgType(); IAuthenticationConsumer<ReturnType, ConsumedType> create(CreateArgType createArg); }
apache/iceberg
1,163
api/src/main/java/org/apache/iceberg/NullOrder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.iceberg; public enum NullOrder { NULLS_FIRST, NULLS_LAST; @Override public String toString() { switch (this) { case NULLS_FIRST: return "NULLS FIRST"; case NULLS_LAST: return "NULLS LAST"; default: throw new IllegalArgumentException("Unexpected null order: " + this); } } }
apache/ignite-3
1,099
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/network/command/TableAwareCommand.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.ignite.internal.partition.replicator.network.command; import org.apache.ignite.internal.network.NetworkMessage; /** * Defines a class of commands bound to a partition of a particular table. */ public interface TableAwareCommand extends NetworkMessage { int tableId(); }
apache/ignite-3
1,141
modules/client/src/main/java/org/apache/ignite/internal/client/PayloadReader.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.ignite.internal.client; /** * Payload reader. */ @FunctionalInterface public interface PayloadReader<T> { /** * Reads the payload from the channel. * * @param arg Channel. * @return Payload. * @throws Exception on failure. */ T apply(PayloadInputChannel arg) throws Exception; }
apache/ignite
1,092
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicClientRemoveFailureTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.ignite.internal.processors.cache.distributed.dht.atomic; /** * */ public class GridCacheAtomicClientRemoveFailureTest extends GridCacheAtomicRemoveFailureTest { /** {@inheritDoc} */ @Override protected boolean testClientNode() { return true; } }
apache/ignite
1,112
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexClientBasicSelfTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.ignite.internal.processors.cache.index; /** * Test dynamic schema operations from client node. */ public class DynamicIndexClientBasicSelfTest extends DynamicIndexAbstractBasicSelfTest { /** {@inheritDoc} */ @Override protected int nodeIndex() { return IDX_CLI; } }
apache/ignite
1,136
modules/core/src/main/java/org/apache/ignite/internal/util/function/ThrowableSupplier.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.ignite.internal.util.function; /** * Specific interface for transmitting exceptions from lambda to external method without a catch. */ @FunctionalInterface public interface ThrowableSupplier<T, E extends Throwable> { /** * Gets a result. * * @return a result */ T get() throws E; }
apache/ignite
1,148
modules/core/src/main/java/org/apache/ignite/plugin/CachePluginConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.ignite.plugin; import java.io.Serializable; import org.apache.ignite.configuration.CacheConfiguration; /** * Cache plugin configuration. It is a point to extend existing {@link CacheConfiguration} * and extend existing functionality of cache. */ public interface CachePluginConfiguration<K, V> extends Serializable { }