repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/ignite-extensions
1,074
modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/dataset/primitive/context/EmptyContext.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.ml.dataset.primitive.context; import java.io.Serializable; /** * An empty partition {@code context}. */ public class EmptyContext implements Serializable { /** */ private static final long serialVersionUID = 4108938672110578991L; }
apache/ignite
1,093
modules/core/src/main/java/org/apache/ignite/internal/util/GridSerializableIterable.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; import java.io.Serializable; /** * Makes {@link Iterable} as {@link Serializable} and is * useful for making anonymous serializable iterators. */ public interface GridSerializableIterable<E> extends Iterable<E>, Serializable { // No-op. }
apache/incubator-brooklyn
1,057
brooklyn-library/software/webapp/src/main/java/org/apache/brooklyn/entity/webapp/nodejs/NodeJsWebAppDriver.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.brooklyn.entity.webapp.nodejs; import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver; public interface NodeJsWebAppDriver extends SoftwareProcessDriver { Integer getHttpPort(); String getAppDir(); }
apache/incubator-brooklyn
1,065
brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/qpid/QpidTopic.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.brooklyn.entity.messaging.qpid; import org.apache.brooklyn.api.entity.ImplementedBy; import org.apache.brooklyn.entity.messaging.Topic; @ImplementedBy(QpidTopicImpl.class) public interface QpidTopic extends QpidDestination, Topic { }
apache/incubator-datalab
1,076
services/self-service/src/main/java/com/epam/datalab/backendapi/service/SecurityService.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 com.epam.datalab.backendapi.service; import com.epam.datalab.auth.UserInfo; public interface SecurityService { UserInfo getUserInfo(String code); UserInfo getUserInfoOffline(String username); UserInfo getServiceAccountInfo(String username); }
apache/incubator-heron
1,083
eco-heron-examples/src/java/org/apache/heron/examples/eco/TestUnits.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.heron.examples.eco; /** * Sample unit of measure enum */ public enum TestUnits { MB("MB"), GB("GB"), B("B"); private String value; TestUnits(String value) { this.value = value; } public String getValue() { return value; } }
apache/incubator-heron
1,083
eco-storm-examples/src/java/org/apache/heron/examples/eco/TestUnits.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.heron.examples.eco; /** * Sample unit of measure enum */ public enum TestUnits { MB("MB"), GB("GB"), B("B"); private String value; TestUnits(String value) { this.value = value; } public String getValue() { return value; } }
apache/incubator-heron
1,092
integration_test/src/java/org/apache/heron/integration_test/core/Condition.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.heron.integration_test.core; import java.io.Serializable; /** * Condition that will be satisfied before the method returns. Throws RuntimeException if it can't */ interface Condition extends Serializable { void satisfyCondition() throws RuntimeException; }
apache/incubator-kie-kogito-runtimes
1,038
springboot/integration-tests/integration-tests-springboot-processes-it/src/main/java/org/acme/examples/model/Rating.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.acme.examples.model; public enum Rating { G, // General Audiences NC_17, // Adults Only PG, // Parental Guidance Suggested PG_13, // Parents Strongly Cautioned R, // Restricted UR // Unrated }
apache/incubator-retired-slider
1,070
slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Validate.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.slider.providers.agent.application.metadata; import org.apache.slider.core.exceptions.SliderException; /** * Implementer provides a validate method */ public interface Validate { public void validate(String version) throws SliderException; }
apache/incubator-retired-wave
1,074
wave/src/main/java/org/waveprotocol/box/server/waveserver/IndexFieldType.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.waveprotocol.box.server.waveserver; /** * The Wave index fields. * * @author yurize@apache.org (Yuri Zelikov) */ public enum IndexFieldType { IN, WITH, CREATOR, WAVEID, WAVELETID, ABOUT, TITLE, SNIPPET, IS, TAG, LMT, ; }
apache/incubator-seata
1,089
test-old-version/src/test/java/io/seata/core/rpc/netty/ProtocolTestConstants.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 io.seata.core.rpc.netty; /** * Mock Constants **/ public class ProtocolTestConstants { public static final String APPLICATION_ID = "mock_tx_app_id_061"; public static final String SERVICE_GROUP = "mock_tx_group"; public static final int MOCK_SERVER_PORT = 8077; }
apache/inlong
1,085
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/enums/ExtractMode.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.inlong.sort.protocol.enums; /** * This class defines the extract mode of all kinds of extract node */ public enum ExtractMode { /** * Scan data from extract node */ SCAN, /** * Capture data from extract node that changed */ CDC }
apache/iotdb-extras
1,069
connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/MergeFilterException.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.iotdb.spark.tsfile.qp.exception; public class MergeFilterException extends LogicalOptimizeException { private static final long serialVersionUID = 8581594261924961899L; public MergeFilterException(String msg) { super(msg); } }
apache/iotdb
1,071
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/FillPolicy.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.iotdb.db.queryengine.plan.statement.component; public enum FillPolicy { PREVIOUS((byte) 0), LINEAR((byte) 1), CONSTANT((byte) 2), ; FillPolicy(byte fillMethod) { this.fillMethod = fillMethod; } final byte fillMethod; }
apache/iotdb
1,088
iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/exception/PipeSinkException.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.iotdb.pipe.api.exception; public class PipeSinkException extends PipeConnectionException { public PipeSinkException(String message) { super(message); } public PipeSinkException(String message, Throwable cause) { super(message, cause); } }
apache/jackrabbit-oak
1,094
oak-core-spi/src/main/java/org/apache/jackrabbit/oak/stats/GaugeStats.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.jackrabbit.oak.stats; import org.osgi.annotation.versioning.ProviderType; @ProviderType public interface GaugeStats<T> extends Stats { /** * Returns the metric's current value. * * @return the metric's current value */ T getValue(); }
apache/juneau
1,096
juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/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. */ /** * HTML5 Data Transfer Objects * * <p> * This package contains predefined DTOs for working with HTML5 elements and structures. * These classes provide a convenient way to serialize and parse HTML5 content * using Juneau's marshalling framework. * </p> */ package org.apache.juneau.bean.html5;
apache/kafka
1,095
clients/src/main/java/org/apache/kafka/common/errors/UnknownSubscriptionIdException.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.kafka.common.errors; /** * This exception indicates that the client sent an invalid or outdated SubscriptionId */ public class UnknownSubscriptionIdException extends ApiException { public UnknownSubscriptionIdException(String message) { super(message); } }
apache/kafka
1,097
streams/src/main/java/org/apache/kafka/streams/kstream/internals/WindowedSerializer.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.kafka.streams.kstream.internals; import org.apache.kafka.common.serialization.Serializer; import org.apache.kafka.streams.kstream.Windowed; public interface WindowedSerializer<T> extends Serializer<Windowed<T>> { byte[] serializeBaseKey(String topic, Windowed<T> data); }
apache/kafka
1,111
server/src/main/java/org/apache/kafka/server/ProcessRole.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.kafka.server; public enum ProcessRole { BrokerRole("broker"), ControllerRole("controller"); private final String roleName; ProcessRole(String roleName) { this.roleName = roleName; } @Override public String toString() { return roleName; } }
apache/linkis
1,028
linkis-computation-governance/linkis-manager/linkis-manager-common/src/main/java/org/apache/linkis/manager/common/entity/resource/ResourceType.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.linkis.manager.common.entity.resource; public enum ResourceType { Default, Memory, CPU, Load, Instance, LoadInstance, Yarn, DriverAndYarn, Kubernetes, DriverAndKubernetes, Special }
apache/linkis
1,028
linkis-computation-governance/linkis-manager/linkis-manager-persistence/src/main/java/org/apache/linkis/manager/exception/NodeInstanceDuplicateException.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.linkis.manager.exception; public class NodeInstanceDuplicateException extends PersistenceErrorException { public NodeInstanceDuplicateException(int errCode, String desc) { super(errCode, desc); } }
apache/maven-indexer
1,109
indexer-core/src/main/java/org/apache/maven/index/Scanner.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.maven.index; /** * An abstraction for scanning content of the artifact repositories * * @author Jason van Zyl */ public interface Scanner { /** * Scan repository artifacts and populate {@link ScanningResult} */ ScanningResult scan(ScanningRequest request); }
apache/maven-javadoc-plugin
1,072
src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/App.java
package optionsumlautencoding.test; /* * 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. */ public class App { public static void main( String[] args ) { System.out.println( "Sample Application." ); } protected void sampleMethod( String str ) { System.out.println( str ); } }
apache/myfaces
1,118
api/src/main/java/jakarta/faces/view/facelets/Metadata.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 jakarta.faces.view.facelets; /** * External information on how to wire dynamic or literal state to the passed Object instance. */ public abstract class Metadata { /** * @param ctx * @param instance */ public abstract void applyMetadata(FaceletContext ctx, Object instance); }
apache/nifi
1,032
nifi-extension-bundles/nifi-snowflake-bundle/nifi-snowflake-processors/src/main/java/org/apache/nifi/processors/snowflake/util/SnowflakeAttributes.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.nifi.processors.snowflake.util; public final class SnowflakeAttributes { private SnowflakeAttributes() { } public static final String ATTRIBUTE_STAGED_FILE_PATH = "snowflake.staged.file.path"; }
apache/oodt
1,093
resource/src/main/java/org/apache/oodt/cas/resource/metadata/JobMetadata.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.oodt.cas.resource.metadata; /** * @author mattmann * @version $Revision$ * * <p> * A set of metadata constants used by {@link Job}s in the resource manager. * </p> */ public interface JobMetadata { String QUEUE_NAME = "QUEUE_NAME"; String LOAD = "LOAD"; }
apache/opennlp
1,098
opennlp-api/src/main/java/opennlp/tools/cmdline/params/DetokenizerParameter.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 opennlp.tools.cmdline.params; import opennlp.tools.cmdline.ArgumentParser.ParameterDescription; public interface DetokenizerParameter { @ParameterDescription(valueName = "dictionary", description = "specifies the file with detokenizer dictionary.") String getDetokenizer(); }
apache/openwebbeans
1,060
webbeans-impl/src/test/java/org/apache/webbeans/test/component/inject/broken/InstanceInjectedBrokenComponent3.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.webbeans.test.component.inject.broken; import jakarta.enterprise.inject.Any; import jakarta.enterprise.inject.Instance; import jakarta.inject.Inject; public class InstanceInjectedBrokenComponent3 { @Inject @Any Instance instance; }
apache/openwebbeans
1,078
webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/zoo/HorseStable.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.webbeans.test.injection.generics.zoo; import jakarta.annotation.PostConstruct; /** * A stable for horses, pigs, etc */ public class HorseStable extends Stable<Horse> { @PostConstruct public void init() { setPet(new Horse()); } }
apache/ozhera
1,086
ozhera-app/app-api/src/main/java/org/apache/ozhera/app/api/service/HeraAuthorizationApi.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.ozhera.app.api.service; import org.apache.ozhera.app.common.Result; /** * @date 2023/6/16 5:18 PM */ public interface HeraAuthorizationApi { Result fetchToken(String user, String sign, Long timestamp); Result checkAuthorization(String token); }
apache/ozone
1,097
hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/lib/service/Groups.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.ozone.lib.service; import java.io.IOException; import java.util.List; import org.apache.hadoop.hdds.annotation.InterfaceAudience; /** * Groups interface. */ @InterfaceAudience.Private public interface Groups { List<String> getGroups(String user) throws IOException; }
apache/pekko
1,092
docs/src/test/java/jdocs/ddata/protobuf/TwoPhaseSetSerializerWithCompression.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2015-2022 Lightbend Inc. <https://www.lightbend.com> */ package jdocs.ddata.protobuf; import jdocs.ddata.TwoPhaseSet; import org.apache.pekko.actor.ExtendedActorSystem; public class TwoPhaseSetSerializerWithCompression extends TwoPhaseSetSerializer { public TwoPhaseSetSerializerWithCompression(ExtendedActorSystem system) { super(system); } // #compression @Override public byte[] toBinary(Object obj) { if (obj instanceof TwoPhaseSet tps) { return compress(twoPhaseSetToProto(tps)); } else { throw new IllegalArgumentException("Can't serialize object of type " + obj.getClass()); } } @Override public Object fromBinaryJava(byte[] bytes, Class<?> manifest) { return twoPhaseSetFromBinary(decompress(bytes)); } // #compression }
apache/phoenix
1,090
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/monitors/TotalMemoryMonitor.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.phoenix.pherf.jmx.monitors; import org.apache.phoenix.pherf.jmx.Stat; public class TotalMemoryMonitor implements Monitor { @Override public Stat getStat() { Stat<Long> stat = new Stat(new Long(Runtime.getRuntime().totalMemory())); return stat; } }
apache/pinot
1,097
pinot-common/src/main/java/org/apache/pinot/sql/parsers/rewriter/QueryRewriter.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.pinot.sql.parsers.rewriter; import org.apache.pinot.common.request.PinotQuery; /** * QueryRewriter is the interface to rewrite PinotQuery. * Rewrite is recommended to be in-place. */ public interface QueryRewriter { PinotQuery rewrite(PinotQuery pinotQuery); }
apache/plc4x
1,083
plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/device/NetworkInterface.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 * * 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 org.apache.plc4x.java.profinet.device; public interface NetworkInterface { String getIpAddress(); String getSubnet(); String getGateway(); byte[] getIpAddressAsByteArray(); byte[] getSubnetAsByteArray(); byte[] getGatewayAsByteArray(); }
apache/poi
1,111
poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/text/XDDFAutoFit.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.poi.xddf.usermodel.text; import org.apache.poi.util.Beta; @Beta public interface XDDFAutoFit { int getFontScale(); int getLineSpaceReduction(); }
apache/polygene-java
1,080
manual/src/main/java/org/apache/polygene/manual/recipes/createConstraint/HasPhoneNumber.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.polygene.manual.recipes.createConstraint; import org.apache.polygene.api.property.Property; // START SNIPPET: property public interface HasPhoneNumber { @PhoneNumber Property<String> phoneNumber(); } // END SNIPPET: property
apache/polygene-java
1,088
libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/TestRole.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.polygene.library.rest.admin; import org.apache.polygene.api.entity.EntityComposite; import org.apache.polygene.api.property.Property; /** * JAVADOC */ public interface TestRole extends EntityComposite { Property<String> name(); }
apache/pulsar-manager
1,096
src/main/java/org/apache/pulsar/manager/entity/UserInfoEntity.java
/** * 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 org.apache.pulsar.manager.entity; import lombok.Data; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; /** * User information entity. */ @Getter @Setter @NoArgsConstructor @Data public class UserInfoEntity { private long userId; private String name; private String password; private String description; private String location; private String company; private String phoneNumber; private String email; private String accessToken; private long expire; }
apache/pulsar
1,064
pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/TransactionCoordinatorInternalStats.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.pulsar.common.policies.data; /** * Transaction coordinator internal stats. */ public class TransactionCoordinatorInternalStats { /** The transaction coordinator log stats. */ public TransactionLogStats transactionLogStats; }
apache/qpid-broker-j
1,078
broker-core/src/main/java/org/apache/qpid/server/model/ContainerStoreUpgraderAndRecoverer.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.qpid.server.model; import java.util.List; import org.apache.qpid.server.store.ConfiguredObjectRecord; public interface ContainerStoreUpgraderAndRecoverer<C extends Container> { C upgradeAndRecover(List<ConfiguredObjectRecord> records); }
apache/qpid-broker-j
1,081
broker-core/src/main/java/org/apache/qpid/server/model/VirtualHostConnectionLimitProvider.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.qpid.server.model; import org.apache.qpid.server.security.limit.ConnectionLimitProvider; @ManagedObject public interface VirtualHostConnectionLimitProvider<X extends VirtualHostConnectionLimitProvider<X>> extends ConnectionLimitProvider<X> { }
apache/qpid-broker-j
1,086
broker-core/src/main/java/org/apache/qpid/server/model/FixedVirtualHostNodeAlias.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.qpid.server.model; public interface FixedVirtualHostNodeAlias<X extends FixedVirtualHostNodeAlias<X>> extends VirtualHostAlias<X> { String VIRTUAL_HOST_NODE = "virtualHostNode"; @ManagedAttribute VirtualHostNode<?> getVirtualHostNode(); }
apache/reef
1,101
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/Identifiable.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.reef.wake; /** * This interface imposes that each object of the class that implements it has an identifier. */ public interface Identifiable { /** * Returns an identifier of this object. * * @return an identifier of this object */ Identifier getId(); }
apache/seatunnel
1,042
seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/serde/DocumentDeserializer.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.seatunnel.connectors.seatunnel.mongodb.serde; import org.bson.BsonDocument; import java.io.Serializable; public interface DocumentDeserializer<T> extends Serializable { T deserialize(BsonDocument bsonDocument); }
apache/servicecomb-java-chassis
1,066
core/src/test/java/org/apache/servicecomb/core/provider/producer/TestProducerProviderManager.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.core.provider.producer; import org.junit.jupiter.api.Test; public class TestProducerProviderManager { @Test public void allowedNoProvider() { // must not throw exception new ProducerProviderManager(null).init(); } }
apache/servicecomb-java-chassis
1,083
governance/src/main/java/org/apache/servicecomb/router/util/VersionCompareUtil.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.router.util; import org.apache.servicecomb.foundation.common.Version; public class VersionCompareUtil { public static int compareVersion(String version1, String version2) { return new Version(version1).compareTo(new Version(version2)); } }
apache/servicecomb-toolkit
1,078
codegen/src/main/java/org/apache/servicecomb/toolkit/codegen/ProjectMetaConstant.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.codegen; public class ProjectMetaConstant { public static final String SERVICE_TYPE = "serviceType"; public static final String PROVIDER_SERVICE_ID = "providerServiceId"; public static final String SERVICE_ID = "serviceId"; }
apache/shiro
1,114
core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapRealm.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.shiro.realm.ldap; /** * This class has been replaced with DefaultLdapRealm. * * @see DefaultLdapRealm * @since 1.1 * @deprecated Renamed to {@link DefaultLdapRealm}, this class will be removed prior to 2.0 */ @Deprecated public class JndiLdapRealm extends DefaultLdapRealm { }
apache/sis
1,094
endorsed/src/org.apache.sis.cloud.aws/main/org/apache/sis/cloud/aws/s3/Resources_en.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.sis.cloud.aws.s3; /** * Resource in English language. */ final class Resources_en extends Resources { /** * Constructs a new resource bundle loading data from * the resource file of the same name as this class. */ public Resources_en() { } }
apache/skywalking
1,071
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/config/NoneStream.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.core.analysis.config; import org.apache.skywalking.oap.server.core.analysis.record.Record; /** * None stream data base on record, support time bucket field to TTL. */ public abstract class NoneStream extends Record { }
apache/solr
1,096
solr/api/src/java/org/apache/solr/client/api/model/BalanceShardUniqueRequestBody.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 com.fasterxml.jackson.annotation.JsonProperty; public class BalanceShardUniqueRequestBody { @JsonProperty(required = true) public String property; public Boolean onlyActiveNodes; public Boolean shardUnique; public String async; }
apache/solr
1,101
solr/api/src/java/org/apache/solr/client/api/model/ListCollectionBackupsResponse.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 com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class ListCollectionBackupsResponse extends SolrJerseyResponse { @JsonProperty public String collection; @JsonProperty public List<CollectionBackupDetails> backups; }
apache/stratos
1,034
components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NetworkPartitionNotExistsException.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.cloud.controller.exception; public class NetworkPartitionNotExistsException extends Exception { public NetworkPartitionNotExistsException(String message) { super(message); } }
apache/streampark
1,056
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/bean/RobotResponse.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.streampark.console.core.bean; import lombok.Getter; import lombok.Setter; /** The robot alarm response of DingTalk And WeCom */ @Getter @Setter public class RobotResponse { private Integer errcode; private String errmsg; }
apache/struts
1,114
core/src/test/java/org/apache/struts2/util/Tiger.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.struts2.util; import java.util.List; /** * DOCUMENT ME! * * @author $author$ * @version $Revision$ */ public class Tiger extends Cat { List dogs; public void setDogs(List dogs) { this.dogs = dogs; } public List getDogs() { return dogs; } }
apache/syncope
1,084
common/idm/lib/src/main/java/org/apache/syncope/common/lib/types/ConnectorCapability.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.common.lib.types; /** * Enum of all possible capabilities that a connector instance can expose. */ public enum ConnectorCapability { AUTHENTICATE, CREATE, UPDATE, UPDATE_DELTA, DELETE, SEARCH, SYNC, LIVE_SYNC; }
apache/tapestry-5
1,076
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/SubmitWithContext.java
// Copyright 2009 The Apache Software Foundation // // 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 org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; public class SubmitWithContext { @Persist @Property private Double result; public Object[] getFormContext() { return new Object[]{Integer.valueOf(7), Double.valueOf(3.14159)}; } void onSelected(Integer first, Double second) { result = first + second; } }
apache/tapestry-5
1,080
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageContentTypeAnalyzer.java
// Copyright 2007 The Apache Software Foundation // // 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 org.apache.tapestry5.internal.services; import org.apache.tapestry5.http.ContentType; import org.apache.tapestry5.internal.structure.Page; public interface PageContentTypeAnalyzer { /** * Analyzes the meta-data for the page and identifies the correct {@link org.apache.tapestry5.http.ContentType} * (including encoding). * * @param page to be rendered * @return the content type */ ContentType findContentType(Page page); }
apache/tapestry-5
1,092
tapestry-func/src/main/java/org/apache/tapestry5/func/LazyMapped2Value.java
// Copyright 2010 The Apache Software Foundation // // 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 org.apache.tapestry5.func; class LazyMapped2Value<T, X, Y> implements LazyValue<Y> { private final Flow<T> left; private final Flow<X> right; private final Mapper2<T, X, Y> mapper; public LazyMapped2Value(Flow<T> left, Flow<X> right, Mapper2<T, X, Y> mapper) { this.left = left; this.right = right; this.mapper = mapper; } @Override public Y get() { return mapper.map(left.first(), right.first()); } }
apache/thrift
1,114
lib/javame/src/org/apache/thrift/protocol/TMessage.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.thrift.protocol; /** * Helper class that encapsulates struct metadata. * */ public class TMessage { public TMessage() {} public TMessage(String n, byte t, int s) { name = n; type = t; seqid = s; } public String name = ""; public byte type; public int seqid; }
apache/tomcat-maven-plugin
1,064
common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/TomcatRunException.java
package org.apache.tomcat.maven.common.run; /* * 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 Olivier Lamy * @since 2.0 */ public class TomcatRunException extends Exception { public TomcatRunException( String s, Throwable throwable ) { super( s, throwable ); } }
apache/tomcat
1,123
java/org/apache/tomcat/buildutil/ForceUtcTimeZone.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.tomcat.buildutil; import java.util.TimeZone; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; public class ForceUtcTimeZone extends Task { @Override public void execute() throws BuildException { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); } }
apache/tomcat
1,132
test/org/apache/naming/TesterEnvEntry.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.naming; public class TesterEnvEntry { private static final String VALID = "valid"; public TesterEnvEntry(String value) { if (!VALID.equals(value)) { throw new IllegalArgumentException(); } } @Override public String toString() { return VALID; } }
apache/tomee
1,053
itests/openejb-itests-optional-classes/lib_with_optional_dep/src/main/java/org/apache/tomee/itests/optional/optlib/Bicycle.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.tomee.itests.optional.optlib; import jakarta.enterprise.context.ApplicationScoped; /** * */ @ApplicationScoped public class Bicycle implements Vehicle { @Override public boolean motorized() { return false; } }
apache/tomee
1,093
server/openejb-client/src/main/java/org/apache/openejb/client/ClientRuntimeException.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; public class ClientRuntimeException extends RuntimeException { public ClientRuntimeException(final String str) { super(str); } public ClientRuntimeException(final String str, final Throwable e) { super(str, e); } }
apache/tomee
1,101
container/openejb-core/src/main/java/org/apache/openejb/testing/MockInjector.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.testing; 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) public @interface MockInjector { }
apache/xmlgraphics-batik
1,080
batik-awt-util/src/main/java/org/apache/batik/ext/awt/image/rendered/TileGenerator.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.batik.ext.awt.image.rendered; import java.awt.image.Raster; /** * This the generic interface for a source of tiles. This is used * when the cache has a miss. * * @version $Id$ */ public interface TileGenerator { Raster genTile(int x, int y); }
google-developer-training/android-advanced
1,054
SimpleAccessibility/app/src/main/java/com/example/android/simpleaccessibility/MainActivity.java
/* * Copyright (C) 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.example.android.simpleaccessibility; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; /** * Main activity. All the functionality of this sample is in * res/layout/activity_main.xml. */ public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
google/bindiff
1,073
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/IMouseStateChange.java
// Copyright 2011-2024 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. package com.google.security.zynamics.zylib.gui.zygraph.editmode; /** Interface for objects that want to be used to describe mouse state changes. */ public interface IMouseStateChange { /** * Returns the next state. * * @return The next state. */ IMouseState getNextState(); /** * Determines whether the event should be changed to yFiles. * * @return True, if the event should be chained to yFiles. False, otherwise. */ boolean notifyYFiles(); }
google/caliper
1,098
caliper-runner/src/main/java/com/google/caliper/runner/worker/WorkerScoped.java
/* * Copyright (C) 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.caliper.runner.worker; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.inject.Scope; /** Scope annotation for per-{@link Worker} bindings, which should be unique per worker instance. */ @Target({TYPE, METHOD}) @Retention(RetentionPolicy.RUNTIME) @Scope public @interface WorkerScoped {}
google/j2cl
1,074
transpiler/javatests/com/google/j2cl/readable/java/bridgemethods/BridgeMethodShadowedSignature.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 * * 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 bridgemethods; import java.util.function.Consumer; public class BridgeMethodShadowedSignature { interface I<I1> { String get(Consumer<? super I1> consumer); } abstract static class B<B1, B2> implements I<B1> { public String get(B2 consumer) { return "B get B2"; } } static class C<C1> extends B<C1, Consumer<? super C1>> implements I<C1> { // Needs a bridge from the I.get(Consumer) signature to B.get(Object) implementation. } }
google/thread-weaver
1,099
test/com/google/testing/threadtester/SimpleClass6.java
/* * Copyright 2009 Weaver 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.testing.threadtester; /** * Simple test class. * * @author alasdair.mackintosh@gmail.com (Alasdair Mackintosh) */ public class SimpleClass6 { SimpleClass calledClass; public void method1() { protected1(); } protected void protected1() { private1(); } protected void protected1(int arg) { private2(arg); } private void private1() { } private void private2(int arg) { } public void callSimpleClass() { calledClass.unique(); } }
google/tsunami-security-scanner
1,084
common/src/main/java/com/google/tsunami/common/net/db/ConnectionProvider.java
/* * Copyright 2023 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.tsunami.common.net.db; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** A client library that communicates with different databases via jdbc. */ public class ConnectionProvider implements ConnectionProviderInterface { public ConnectionProvider() {} @Override public Connection getConnection(String url, String user, String password) throws SQLException { return DriverManager.getConnection(url, user, password); } }
googleapis/google-cloud-java
1,024
java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TrajectoryAnyOrderMatchSpecOrBuilder.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/aiplatform/v1beta1/evaluation_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.aiplatform.v1beta1; public interface TrajectoryAnyOrderMatchSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.TrajectoryAnyOrderMatchSpec) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,027
java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/UndeployProcessorVersionResponseOrBuilder.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/documentai/v1/document_processor_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.documentai.v1; public interface UndeployProcessorVersionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.UndeployProcessorVersionResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/sdk-platform-java
1,069
java-core/google-cloud-core/src/main/java/com/google/cloud/PlatformInformation.java
/* * Copyright 2017 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.cloud; import com.google.api.core.InternalApi; @InternalApi("This class should only be used within google-cloud-java") public final class PlatformInformation { public static final String GAE_RUNTIME = System.getenv("GAE_RUNTIME"); private PlatformInformation() {} public static boolean isOnGAEStandard7() { return "java7".equals(GAE_RUNTIME); } public static boolean isOnGAEStandard8() { return "java8".equals(GAE_RUNTIME); } }
hibernate/hibernate-ogm
1,077
core/src/main/java/org/hibernate/ogm/type/impl/ShortType.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.type.impl; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.type.descriptor.impl.WrappedGridTypeDescriptor; import org.hibernate.type.descriptor.java.ShortTypeDescriptor; /** * Represents a Short type * * @author Ajay Bhat */ public class ShortType extends AbstractGenericBasicType<Short> { public static ShortType INSTANCE = new ShortType(); public ShortType() { super( WrappedGridTypeDescriptor.INSTANCE, ShortTypeDescriptor.INSTANCE ); } @Override public String[] getRegistrationKeys() { return new String[] {getName(), short.class.getName(), Short.class.getName()}; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } @Override public String getName() { return "short"; } }
hibernate/hibernate-orm
1,031
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/uuid/custom/Book.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.identifier.uuid.custom; import java.util.UUID; import org.hibernate.annotations.UuidGenerator; import jakarta.persistence.Basic; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; /** * @author Steve Ebersole */ //tag::example-identifiers-generators-uuid-implicit[] @Entity public class Book { @Id @GeneratedValue @UuidGenerator(algorithm = CustomUuidValueCreator.class) private UUID id; @Basic private String name; //end::example-identifiers-generators-uuid-implicit[] protected Book() { // for Hibernate use } public Book(String name) { this.name = name; } public UUID getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } //tag::example-identifiers-generators-uuid-implicit[] } //end::example-identifiers-generators-uuid-implicit[]
hibernate/hibernate-orm
1,055
hibernate-core/src/main/java/org/hibernate/metamodel/spi/EmbeddableRepresentationStrategy.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.metamodel.spi; import org.hibernate.Incubating; import org.hibernate.bytecode.spi.ReflectionOptimizer; /** * Describes the representation of a particular embeddable type. * * @todo (6.x) add `@EmbeddableRepresentationStrategy` - see https://hibernate.atlassian.net/browse/HHH-14951 */ @Incubating public interface EmbeddableRepresentationStrategy extends ManagedTypeRepresentationStrategy { /** * Create a delegate capable of instantiating instances of the represented type. */ EmbeddableInstantiator getInstantiator(); default EmbeddableInstantiator getInstantiatorForDiscriminator(Object discriminatorValue) { return getInstantiator(); } default EmbeddableInstantiator getInstantiatorForClass(String className) { return getInstantiator(); } /** * The reflection optimizer to use for this embeddable. * * https://hibernate.atlassian.net/browse/HHH-14952 */ ReflectionOptimizer getReflectionOptimizer(); }
hibernate/hibernate-orm
1,057
hibernate-core/src/main/java/org/hibernate/boot/spi/JpaOrmXmlPersistenceUnitDefaultAware.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.spi; import org.hibernate.boot.models.xml.spi.PersistenceUnitMetadata; /** * Contract for things that need to be aware of JPA {@code orm.xml}-defined persistence-unit-defaults. * Only {@link MetadataBuildingOptions} are supported to implement this contract. * * @since 5.0 * * @author Steve Ebersole */ public interface JpaOrmXmlPersistenceUnitDefaultAware { /** * Represents the {@code persistence-unit-defaults} to be applied */ interface JpaOrmXmlPersistenceUnitDefaults { String getDefaultSchemaName(); String getDefaultCatalogName(); boolean shouldImplicitlyQuoteIdentifiers(); } /** * Apply the {@code orm.xml}-defined {@code persistence-unit-defaults} values. * * @param jpaOrmXmlPersistenceUnitDefaults The {@code persistence-unit-defaults} values */ void apply(JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults); void apply(PersistenceUnitMetadata persistenceUnitMetadata); }
hibernate/hibernate-shards
1,081
src/test/java/org/hibernate/shards/strategy/access/ParallelShardAccessStrategyTest.java
/** * Copyright (C) 2007 Google Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library 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 * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package org.hibernate.shards.strategy.access; import org.junit.Test; /** * @author maxr@google.com (Max Ross) */ public class ParallelShardAccessStrategyTest { @Test(expected = NullPointerException.class) public void testCtor() { new ParallelShardAccessStrategy(null); } }
hibernate/hibernate-validator
1,025
engine/src/test/java/org/hibernate/validator/test/constraintvalidator/ConstraintDefinitionTypeMismatchTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.test.constraintvalidator; import static org.hibernate.validator.testutils.ValidatorUtil.getValidator; import jakarta.validation.ConstraintDefinitionException; import jakarta.validation.Validator; import org.hibernate.validator.testutil.TestForIssue; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** * @author Guillaume Smet */ @TestForIssue(jiraKey = "HV-1592") public class ConstraintDefinitionTypeMismatchTest { private Validator validator; @BeforeMethod public void setUp() { validator = getValidator(); } @Test(expectedExceptions = ConstraintDefinitionException.class, expectedExceptionsMessageRegExp = "^HV000243:.*") public void constraint_validator_constraint_type_mismatch_causes_exception() { validator.validate( new TypeMismatchBean() ); } public class TypeMismatchBean { @TypeMismatchConstraint private String property; } }
openjdk/jdk8
1,120
langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I2.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. */ package pkg3; public interface I2 { public void foo(); }
openjdk/jdk8
1,120
langtools/test/com/sun/javadoc/testOverridenMethods/pkg3/I4.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. */ package pkg3; public interface I4 { public void foo(); }
openjdk/jdk8
1,120
langtools/test/tools/javac/importContext/namedPackage/bar/Baz.java
/* * Copyright (c) 2000, 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 bar; public class Baz { public static void test() {} }
openjdk/jdk8
1,124
langtools/test/tools/javac/diags/examples/AlreadyDefined.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.already.defined class X { int i; int i; }
openjdk/jdk8
1,124
langtools/test/tools/javac/diags/examples/ClassPublicInFile.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.class.public.should.be.in.file public class C { }
openjdk/jdk8
1,132
langtools/test/tools/javac/miranda/4686811/p2/B.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 p2; public abstract class B extends p1.A { } class D extends p1.C { }
openjdk/jdk8
1,136
langtools/test/tools/javac/6627362/x/Object.java
/* * Copyright (c) 2007, 2008, 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 java.lang; /* * Object, without clone() */ public class Object { }
openjdk/jtreg
1,157
test/exitCodes/Error.java
/* * Copyright (c) 1998, 2013, 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. */ /* * @test * @ignore */ public class Error { public static void main(String... args) { } }
oracle/coherence
1,086
prj/test/functional/grpc-client-tck/src/main/java/grpc/client/DefaultSessionsIT.java
/* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package grpc.client; import com.tangosol.internal.net.ConfigurableCacheFactorySession; import com.tangosol.net.Coherence; import com.tangosol.net.Session; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; public class DefaultSessionsIT { @AfterEach public void cleanup() { Coherence.closeAll(); } @Test public void shouldNotUseGrpcForDefaultSession() throws Exception { Coherence coherence = Coherence.client() .start() .get(5, TimeUnit.MINUTES); Session session = coherence.getSession(); assertThat(session, is(instanceOf(ConfigurableCacheFactorySession.class))); } }
apache/ctakes
1,069
ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/cased/dictionary/CasedDictionary.java
package org.apache.ctakes.dictionary.cased.dictionary; import org.apache.ctakes.dictionary.cased.lookup.CandidateTerm; import org.apache.ctakes.dictionary.cased.lookup.LookupToken; import java.util.Collection; /** * Dictionary used to lookup terms by the most rare word within them. * * @author SPF , chip-nlp * @version %I% * @since 8/13/2020 */ public interface CasedDictionary { /** * The Type identifier and Name are used to maintain a collection of dictionaries, * so the combination of Type and Name should be unique for each dictionary if possible. * * @return simple name for the dictionary */ String getName(); /** * Any single token can exist in zero or more terms in the dictionary. It may exist as its -own- form or as an * alternate canonical variant. This method will check the dictionary for both. * * @param lookupToken a single-word token * @return zero or more terms that contain the lookup token */ Collection<CandidateTerm> getCandidateTerms( final LookupToken lookupToken ); }
apache/cxf
1,062
distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.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 sample.rs.service.hello1; import sample.rs.service.api.HelloService; public class HelloServiceImpl1 implements HelloService { public String sayHello(String a) { return "Hello " + a + ", Welcome to CXF RS Spring Boot World!!!"; } }
apache/cxf
1,079
rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/UserInfoContextClassProvider.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.rs.security.oidc.rp; import org.apache.cxf.jaxrs.ext.ContextClassProvider; public class UserInfoContextClassProvider implements ContextClassProvider { @Override public Class<?> getContextClass() { return UserInfoContext.class; } }
apache/cxf
1,093
rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/BookOrderEnum.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.jaxrs.model.wadl; public enum BookOrderEnum { INVOICED("Invoiced"), NOT_INVOICED("Not invoiced"); private final String desc; BookOrderEnum(String desc) { this.desc = desc; } public String toString() { return desc; } }
apache/derby
1,048
plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/launch/StartDerbyServerLaunchConfigurationDelegate.java
/* Derby - Class org.apache.derby.ui.launch.StartDerbyServerLaunchConfigurationDelegate 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.derby.ui.launch; import org.eclipse.jdt.launching.JavaLaunchDelegate; public class StartDerbyServerLaunchConfigurationDelegate extends JavaLaunchDelegate { }
apache/dolphinscheduler
1,040
dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/ConnectStrategy.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.dolphinscheduler.registry.api; /** * This interface defined a method to be executed when the server disconnected from registry. */ public interface ConnectStrategy { void disconnect(); void reconnect(); }